forked from TrueCloudLab/rclone
vfs: Add FlushDirCache method
This commit is contained in:
parent
a5b034a992
commit
9738f8532b
1 changed files with 5 additions and 1 deletions
|
@ -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 {
|
func (vfs *VFS) CleanUp() error {
|
||||||
return vfs.cache.cleanUp()
|
return vfs.cache.cleanUp()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FlushDirCache empties the directory cache
|
||||||
|
func (vfs *VFS) FlushDirCache() {
|
||||||
|
vfs.root.ForgetAll()
|
||||||
|
}
|
||||||
|
|
||||||
// WaitForWriters sleeps until all writers have finished or
|
// WaitForWriters sleeps until all writers have finished or
|
||||||
// time.Duration has elapsed
|
// time.Duration has elapsed
|
||||||
|
|
Loading…
Reference in a new issue