fs: Document that Purger returns error on empty directory, test and fix

This commit is contained in:
Nick Craig-Wood 2014-07-28 21:02:00 +01:00
parent 9711a5d647
commit 2f9f9afac2
4 changed files with 19 additions and 4 deletions

View file

@ -85,7 +85,7 @@ type Fs interface {
// Remove the directory (container, bucket) if empty
//
// Return an error if it doesn't exists or isn't empty
// Return an error if it doesn't exist or isn't empty
Rmdir() error
// Precision of the ModTimes in this Fs
@ -135,6 +135,8 @@ type Purger interface {
//
// Implement this if you have a way of deleting all the files
// quicker than just running Remove() on the result of List()
//
// Return an error if it doesn't exist
Purge() error
}