Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

fs: add IsLocal feature to identify local backend #3419

Nick Craig-Woodf0e0d6cc3c4b
diff --git a/backend/local/local.go b/backend/local/local.go
index e07ad1fa0..1063a323c 100644
--- a/backend/local/local.go
+++ b/backend/local/local.go
@@ -194,6 +194,7 @@ func NewFs(name, root string, m configmap.Mapper) (fs.Fs, error) {
f.features = (&fs.Features{
CaseInsensitive: f.caseInsensitive(),
CanHaveEmptyDirectories: true,
+ IsLocal: true,
}).Fill(f)
if opt.FollowSymlinks {
f.lstat = os.Stat
diff --git a/fs/fs.go b/fs/fs.go
index 70e01583b..9dadc8716 100644
--- a/fs/fs.go
+++ b/fs/fs.go
@@ -473,6 +473,7 @@ type Features struct {
SetTier bool // allows set tier functionality on objects
GetTier bool // allows to retrieve storage tier of objects
ServerSideAcrossConfigs bool // can server side copy between different remotes of the same type
+ IsLocal bool // is the local backend
// Purge all files in the root and the root directory
//