MCPcopy
hub / github.com/rclone/rclone / DirSetModTime

Method DirSetModTime

backend/union/union.go:441–458  ·  view source on GitHub ↗

DirSetModTime sets the directory modtime for dir

(ctx context.Context, dir string, modTime time.Time)

Source from the content-addressed store, hash-verified

439
440// DirSetModTime sets the directory modtime for dir
441func (f *Fs) DirSetModTime(ctx context.Context, dir string, modTime time.Time) error {
442 upstreams, err := f.action(ctx, dir)
443 if err != nil {
444 return err
445 }
446 errs := Errors(make([]error, len(upstreams)))
447 multithread(len(upstreams), func(i int) {
448 u := upstreams[i]
449 // ignore DirSetModTime on upstreams which don't support it
450 if do := u.Features().DirSetModTime; do != nil {
451 err := do(ctx, dir, modTime)
452 if err != nil {
453 errs[i] = fmt.Errorf("%s: %w", upstreams[i].Name(), err)
454 }
455 }
456 })
457 return errs.Err()
458}
459
460// ChangeNotify calls the passed function with a path
461// that has had changes. If the implementation

Callers

nothing calls this directly

Calls 7

actionMethod · 0.95
ErrorsTypeAlias · 0.85
multithreadFunction · 0.85
FeaturesMethod · 0.65
NameMethod · 0.65
ErrorfMethod · 0.45
ErrMethod · 0.45

Tested by

no test coverage detected