devfs package - code.pfad.fr/devf
package devfs exposes FS utilities (watch a directory for changes, fallback chain of FS).
Types
type EndRecorder
EndRecorder must be called to get all the files that were accessed during a given period.
type FallbackFS
FallbackFS will try to Open a file from each of the underlying fs, until succesful.
func (FallbackFS) Open
type Watcher
func WatchDir
WatchDir returns a wrapped [os.DirFS]. Each opened file is added to a watchlist, any write to those file (by external processes) is notified on the provided fsEvents channel.
At most maxWatchedDirs will be watched (folder with the least recent open/watch event will be evicted if needed).
func (*Watcher) Open
func (*Watcher) StartRecording
StartRecording returns an EndRecorder which will list all the opened files between the start and the time the EndRecorder was called.