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)
| 1845 | // MergeDirs merges the contents of all the directories passed |
| 1846 | // in into the first one and rmdirs the other directories. |
| 1847 | func (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 |
| 1859 | func (f *Fs) DirCacheFlush() { |