Registry / utility / fsnotify-fsnotify

fsnotify-fsnotify

JSON →
library1.10.1gogounverified

Package fsnotify provides a cross-platform interface for file system notifications.

go get github.com/fsnotify/fsnotify
INSTALL
IMPORT
SIG · FSNOTIFY-FSNOTIFY
F
fsnotify-fsnotify
utilitygov1.10.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

fsnotify
github.com/fsnotify/fsnotify

Watch a directory for file system events.

package main import ( "log" "github.com/fsnotify/fsnotify" ) func main() { watcher, _ := fsnotify.NewWatcher() defer watcher.Close() go func() { for event := range watcher.Events { log.Println("event:", event) } }() watcher.Add("/tmp") select {} }
Debug
Known issues
gotchaOn Linux, fsnotify uses inotify which has per-user limits; watching many files may require increasing limits.
fix
Increase /proc/sys/fs/inotify/max_user_watches or use a different approach for large directory trees.
affects: >=1.0.0
Upgrade
Version history
1.10.1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
fsnotify-fsnotify — go get fsnotify-fsnotify · libregistry