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

local: implement DirSetModTime

nielash67e3725205a7
diff --git a/backend/local/local.go b/backend/local/local.go
index 832390d5a..9bd903c6a 100644
--- a/backend/local/local.go
+++ b/backend/local/local.go
@@ -643,6 +643,16 @@ func (f *Fs) Mkdir(ctx context.Context, dir string) error {
return nil
}
+// DirSetModTime sets the directory modtime for dir
+func (f *Fs) DirSetModTime(ctx context.Context, dir string, modTime time.Time) error {
+ o := Object{
+ fs: f,
+ remote: dir,
+ path: f.localPath(dir),
+ }
+ return o.SetModTime(ctx, modTime)
+}
+
// Rmdir removes the directory
//
// If it isn't empty it will return an error
@@ -1472,6 +1482,7 @@ var (
_ fs.DirMover = &Fs{}
_ fs.Commander = &Fs{}
_ fs.OpenWriterAter = &Fs{}
+ _ fs.DirSetModTimer = &Fs{}
_ fs.Object = &Object{}
_ fs.Metadataer = &Object{}
)