"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
fs: define SlowModTime and SlowHash features in the relevant backends
Nick Craig-Woodc8205763292a
diff --git a/backend/local/local.go b/backend/local/local.goindex 02367cfe1..af170e585 100644--- a/backend/local/local.go+++ b/backend/local/local.go@@ -231,6 +231,7 @@ func NewFs(name, root string, m configmap.Mapper) (fs.Fs, error) {CaseInsensitive: f.caseInsensitive(),CanHaveEmptyDirectories: true,IsLocal: true,+ SlowHash: true,}).Fill(f)if opt.FollowSymlinks {f.lstat = os.Statdiff --git a/backend/qingstor/qingstor.go b/backend/qingstor/qingstor.goindex 9e56d4c23..34fa276ed 100644--- a/backend/qingstor/qingstor.go+++ b/backend/qingstor/qingstor.go@@ -356,6 +356,7 @@ func NewFs(name, root string, m configmap.Mapper) (fs.Fs, error) {WriteMimeType: true,BucketBased: true,BucketBasedRootOK: true,+ SlowModTime: true,}).Fill(f)if f.rootBucket != "" && f.rootDirectory != "" {diff --git a/backend/s3/s3.go b/backend/s3/s3.goindex d8ec3fbc3..0b66088dc 100644--- a/backend/s3/s3.go+++ b/backend/s3/s3.go@@ -1334,6 +1334,7 @@ func NewFs(name, root string, m configmap.Mapper) (fs.Fs, error) {BucketBasedRootOK: true,SetTier: true,GetTier: true,+ SlowModTime: true,}).Fill(f)if f.rootBucket != "" && f.rootDirectory != "" {// Check to see if the object existsdiff --git a/backend/sftp/sftp.go b/backend/sftp/sftp.goindex 51d03de08..a3d2618e6 100644--- a/backend/sftp/sftp.go+++ b/backend/sftp/sftp.go@@ -500,6 +500,7 @@ func NewFsWithConnection(ctx context.Context, name string, root string, m config}f.features = (&fs.Features{CanHaveEmptyDirectories: true,+ SlowHash: true,}).Fill(f)// Make a connection and pool it to return errors earlyc, err := f.getSftpConnection()diff --git a/backend/swift/swift.go b/backend/swift/swift.goindex 394f40d1e..c94b79822 100644--- a/backend/swift/swift.go+++ b/backend/swift/swift.go@@ -447,6 +447,7 @@ func NewFsWithConnection(opt *Options, name, root string, c *swift.Connection, nWriteMimeType: true,BucketBased: true,BucketBasedRootOK: true,+ SlowModTime: true,}).Fill(f)if f.rootContainer != "" && f.rootDirectory != "" {// Check to see if the object exists - ignoring directory markersdiff --git a/fs/fs.go b/fs/fs.goindex 121898a97..0348f1296 100644--- a/fs/fs.go+++ b/fs/fs.go@@ -515,6 +515,8 @@ type Features struct {GetTier bool // allows to retrieve storage tier of objectsServerSideAcrossConfigs bool // can server side copy between different remotes of the same typeIsLocal bool // is the local backend+ SlowModTime bool // if calling ModTime() generally takes an extra transaction+ SlowHash bool // if calling Hash() generally takes an extra transaction// Purge all files in the root and the root directory//@@ -792,6 +794,10 @@ func (ft *Features) Mask(f Fs) *Features {ft.BucketBasedRootOK = ft.BucketBasedRootOK && mask.BucketBasedRootOKft.SetTier = ft.SetTier && mask.SetTierft.GetTier = ft.GetTier && mask.GetTier+ ft.ServerSideAcrossConfigs = ft.ServerSideAcrossConfigs && mask.ServerSideAcrossConfigs+ // ft.IsLocal = ft.IsLocal && mask.IsLocal Don't propagate IsLocal+ ft.SlowModTime = ft.SlowModTime && mask.SlowModTime+ ft.SlowHash = ft.SlowHash && mask.SlowHashif mask.Purge == nil {ft.Purge = nil