Implement cleanup command for emptying trash / removing old versions of files

This commit is contained in:
Nick Craig-Wood
2016-07-01 16:35:36 +01:00
parent c8e2531c8b
commit 9aae143833
4 changed files with 36 additions and 0 deletions
+9
View File
@@ -1379,3 +1379,12 @@ func listToChan(list *Lister) ObjectsChan {
}()
return o
}
// CleanUp removes the trash for the Fs
func CleanUp(f Fs) error {
fc, ok := f.(CleanUpper)
if !ok {
return errors.Errorf("%v doesn't support cleanup", f)
}
return fc.CleanUp()
}