{"id":51712,"library":"fsnotify-fsnotify-v1","title":"fsnotify","description":"Package fsnotify provides a platform-independent interface for file system notifications.","status":"active","version":"1.4.7","language":"go","source_language":null,"source_url":null,"tags":["filesystem","notifications","watch","cross-platform"],"install":[{"cmd":"go get gopkg.in/fsnotify/fsnotify.v1","lang":"bash","label":"Install gopkg.in/fsnotify/fsnotify.v1"}],"dependencies":[],"imports":[{"symbol":"fsnotify","correct":"gopkg.in/fsnotify/fsnotify.v1"}],"quickstart":{"code":"package main\n\nimport (\n    \"log\"\n    \"gopkg.in/fsnotify/fsnotify.v1\"\n)\n\nfunc main() {\n    watcher, err := fsnotify.NewWatcher()\n    if err != nil {\n        log.Fatal(err)\n    }\n    defer watcher.Close()\n\n    done := make(chan bool)\n    go func() {\n        for {\n            select {\n            case event, ok := <-watcher.Events:\n                if !ok {\n                    return\n                }\n                log.Println(\"event:\", event)\n            case err, ok := <-watcher.Errors:\n                if !ok {\n                    return\n                }\n                log.Println(\"error:\", err)\n            }\n        }\n    }()\n\n    err = watcher.Add(\"/tmp\")\n    if err != nil {\n        log.Fatal(err)\n    }\n    <-done\n}","lang":"go","description":"Watch a directory for file system events using fsnotify."},"warnings":[{"fix":"Migrate to github.com/fsnotify/fsnotify (v1.8.x) for continued support.","message":"v1.x is deprecated; use gopkg.in/fsnotify/fsnotify.v1 is the last v1 release.","severity":"breaking","affected_versions":">=1.4.7"}],"env_vars":null,"search_vec":"'cross':18 'cross-platform':17 'file':11 'filesystem':14 'fsnotifi':1,3 'independ':8 'interfac':9 'notif':13,15 'packag':2 'platform':7,19 'platform-independ':6 'provid':4 'system':12 'watch':16","created_at":"2026-06-15T06:27:18.050347+00:00","updated_at":"2026-06-15T06:27:18.050347+00:00","problems":[],"ecosystem":"go","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/fsnotify/fsnotify","github":null,"docs":"https://pkg.go.dev/gopkg.in/fsnotify/fsnotify.v1#section-documentation","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-15","next_check":"2026-12-12","install_tag":null}}