vfs: Add FlushDirCache method

This commit is contained in:
Nick Craig-Wood 2017-11-18 11:59:01 +00:00
parent a5b034a992
commit 9738f8532b
1 changed files with 5 additions and 1 deletions

View File

@ -243,11 +243,15 @@ func (vfs *VFS) Shutdown() {
}
}
// CleanUp deletes the contents of the cache
// CleanUp deletes the contents of the on disk cache
func (vfs *VFS) CleanUp() error {
return vfs.cache.cleanUp()
}
// FlushDirCache empties the directory cache
func (vfs *VFS) FlushDirCache() {
vfs.root.ForgetAll()
}
// WaitForWriters sleeps until all writers have finished or
// time.Duration has elapsed