MCPcopy
hub / github.com/rclone/rclone / MergeDirs

Method MergeDirs

backend/cache/cache.go:1847–1856  ·  view source on GitHub ↗

MergeDirs merges the contents of all the directories passed in into the first one and rmdirs the other directories.

(ctx context.Context, dirs []fs.Directory)

Source from the content-addressed store, hash-verified

1845// MergeDirs merges the contents of all the directories passed
1846// in into the first one and rmdirs the other directories.
1847func (f *Fs) MergeDirs(ctx context.Context, dirs []fs.Directory) error {
1848 do := f.Fs.Features().MergeDirs
1849 if do == nil {
1850 return errors.New("MergeDirs not supported")
1851 }
1852 for _, dir := range dirs {
1853 _ = f.cache.RemoveDir(dir.Remote())
1854 }
1855 return do(ctx, dirs)
1856}
1857
1858// DirCacheFlush flushes the dir cache
1859func (f *Fs) DirCacheFlush() {

Callers

nothing calls this directly

Calls 3

RemoveDirMethod · 0.80
FeaturesMethod · 0.65
RemoteMethod · 0.65

Tested by

no test coverage detected