1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-10 05:13:45 +00:00

cache,chunker,combine,compress,crypt,hasher,union: implement DirSetModTime (if supported by wrapped remote)

This commit is contained in:
nielash
2024-01-13 08:19:37 -05:00
committed by Nick Craig-Wood
parent 17c0ecc72c
commit 0297542f6b
6 changed files with 75 additions and 0 deletions

View File

@@ -520,6 +520,15 @@ func (f *Fs) Mkdir(ctx context.Context, dir string) error {
return f.Fs.Mkdir(ctx, f.cipher.EncryptDirName(dir))
}
// DirSetModTime sets the directory modtime for dir
func (f *Fs) DirSetModTime(ctx context.Context, dir string, modTime time.Time) error {
do := f.Fs.Features().DirSetModTime
if do == nil {
return fs.ErrorNotImplemented
}
return do(ctx, f.cipher.EncryptDirName(dir), modTime)
}
// Rmdir removes the directory (container, bucket) if empty
//
// Return an error if it doesn't exist or isn't empty
@@ -1207,6 +1216,7 @@ var (
_ fs.Abouter = (*Fs)(nil)
_ fs.Wrapper = (*Fs)(nil)
_ fs.MergeDirser = (*Fs)(nil)
_ fs.DirSetModTimer = (*Fs)(nil)
_ fs.DirCacheFlusher = (*Fs)(nil)
_ fs.ChangeNotifier = (*Fs)(nil)
_ fs.PublicLinker = (*Fs)(nil)