import "code.pfad.fr/devf/devfs"
package devfs exposes FS utilities (watch a directory for changes, fallback chain of FS).
func WatchedDir(ctx context.Context, dir string, messages chan<- string, maxWatchedDirs int) (fs.FS, error)
WatchedDir 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 messages channel.
At most maxWatchedDirs will be watched (folder opened the least recently will be evicted if needed).
FallbackFS will try to Open a file from each of the underlying fs, until succesful.