vfs: add --vfs-refresh flag to read all the directories on start

Refreshes the directory listing recursively at VFS start time.
This commit is contained in:
Beyond Meat
2023-09-08 06:41:12 -07:00
committed by Nick Craig-Wood
parent a752563842
commit 3337fe31c7
3 changed files with 17 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ type Options struct {
ReadOnly bool // if set VFS is read only
NoModTime bool // don't read mod times for files
DirCacheTime time.Duration // how long to consider directory listing cache valid
Refresh bool // refreshes the directory listing recursively on start
PollInterval time.Duration
Umask int
UID uint32
@@ -44,6 +45,7 @@ var DefaultOpt = Options{
NoChecksum: false,
NoSeek: false,
DirCacheTime: 5 * 60 * time.Second,
Refresh: false,
PollInterval: time.Minute,
ReadOnly: false,
Umask: 0,