import "code.pfad.fr/devf/devfs"
package devfs exposes FS utilities (watch a directory for changes, fallback chain of FS).
EndRecorder must be called to get all the files that were accessed during a given period.
FallbackFS will try to Open a file from each of the underlying fs, until succesful.
func WatchDir(ctx context.Context, dir string, fsEvents chan<- string, maxWatchedDirs int) (*Watcher, error)
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 (f *Watcher) StartRecording() EndRecorder
StartRecording returns an EndRecorder which will list all the opened files between the start and the time the EndRecorder was called.