diff --git a/vfs/vfs.go b/vfs/vfs.go index 858ea6ae6..14e646a25 100644 --- a/vfs/vfs.go +++ b/vfs/vfs.go @@ -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