Registry / utility / fsnotify-fsnotify-v1

fsnotify-fsnotify-v1

JSON →
library1.4.7gogounverified

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

go get gopkg.in/fsnotify/fsnotify.v1
INSTALL
IMPORT
SIG · FSNOTIFY-FSNOTIFY-
F
fsnotify-fsnotify-v1
utilitygov1.4.7
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
✓ gopkg.in/fsnotify/fsnotify.v1

Watch a directory for file system events using fsnotify.

package main import ( "log" "gopkg.in/fsnotify/fsnotify.v1" ) func main() { watcher, err := fsnotify.NewWatcher() if err != nil { log.Fatal(err) } defer watcher.Close() done := make(chan bool) go func() { for { select { case event, ok := <-watcher.Events: if !ok { return } log.Println("event:", event) case err, ok := <-watcher.Errors: if !ok { return } log.Println("error:", err) } } }() err = watcher.Add("/tmp") if err != nil { log.Fatal(err) } <-done }
Debug
Known issues
breakingv1.x is deprecated; use gopkg.in/fsnotify/fsnotify.v1 is the last v1 release.
fix
Migrate to github.com/fsnotify/fsnotify (v1.8.x) for continued support.
affects: >=1.4.7
Upgrade
Version history
1.4.7latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

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