From 67e3725205a79c6f0a3c6f5a9e9a0904206ccf15 Mon Sep 17 00:00:00 2001 From: nielash Date: Sat, 13 Jan 2024 08:19:37 -0500 Subject: [PATCH] local: implement DirSetModTime --- backend/local/local.go | 11 +++++++++++ 1 file changed, 11 insertions(+) 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{} )