{"id":22998239,"url":"https://github.com/uswitch/fsnotify","last_synced_at":"2025-08-14T00:31:55.468Z","repository":{"id":57577654,"uuid":"137489518","full_name":"uswitch/fsnotify","owner":"uswitch","description":"Cross-platform file system notifications for Go. https://fsnotify.org","archived":false,"fork":false,"pushed_at":"2018-06-15T13:19:16.000Z","size":332,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-06-20T17:42:30.085Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uswitch.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-15T13:14:39.000Z","updated_at":"2024-05-30T23:02:34.000Z","dependencies_parsed_at":"2022-09-26T19:02:47.162Z","dependency_job_id":null,"html_url":"https://github.com/uswitch/fsnotify","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uswitch%2Ffsnotify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uswitch%2Ffsnotify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uswitch%2Ffsnotify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uswitch%2Ffsnotify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uswitch","download_url":"https://codeload.github.com/uswitch/fsnotify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229786999,"owners_count":18124014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-15T06:12:16.906Z","updated_at":"2024-12-15T06:12:17.553Z","avatar_url":"https://github.com/uswitch.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# File system notifications for Go\n\n[![GoDoc](https://godoc.org/github.com/fsnotify/fsnotify?status.svg)](https://godoc.org/github.com/fsnotify/fsnotify) [![Go Report Card](https://goreportcard.com/badge/github.com/fsnotify/fsnotify)](https://goreportcard.com/report/github.com/fsnotify/fsnotify)\n\nfsnotify utilizes [golang.org/x/sys](https://godoc.org/golang.org/x/sys) rather than `syscall` from the standard library. Ensure you have the latest version installed by running:\n\n```console\ngo get -u golang.org/x/sys/...\n```\n\nCross platform: Windows, Linux, BSD and macOS.\n\n|Adapter   |OS        |Status    |\n|----------|----------|----------|\n|inotify   |Linux 2.6.27 or later, Android\\*|Supported [![Build Status](https://travis-ci.org/fsnotify/fsnotify.svg?branch=master)](https://travis-ci.org/fsnotify/fsnotify)|\n|kqueue    |BSD, macOS, iOS\\*|Supported [![Build Status](https://travis-ci.org/fsnotify/fsnotify.svg?branch=master)](https://travis-ci.org/fsnotify/fsnotify)|\n|ReadDirectoryChangesW|Windows|Supported [![Build status](https://ci.appveyor.com/api/projects/status/ivwjubaih4r0udeh/branch/master?svg=true)](https://ci.appveyor.com/project/NathanYoungman/fsnotify/branch/master)|\n|FSEvents  |macOS         |[Planned](https://github.com/fsnotify/fsnotify/issues/11)|\n|FEN       |Solaris 11    |[In Progress](https://github.com/fsnotify/fsnotify/issues/12)|\n|fanotify  |Linux 2.6.37+ | |\n|USN Journals |Windows    |[Maybe](https://github.com/fsnotify/fsnotify/issues/53)|\n|Polling   |*All*         |[Maybe](https://github.com/fsnotify/fsnotify/issues/9)|\n\n\\* Android and iOS are untested.\n\nPlease see [the documentation](https://godoc.org/github.com/fsnotify/fsnotify) and consult the [FAQ](#faq) for usage information.\n\n## API stability\n\nfsnotify is a fork of [howeyc/fsnotify](https://godoc.org/github.com/howeyc/fsnotify) with a new API as of v1.0. The API is based on [this design document](http://goo.gl/MrYxyA). \n\nAll [releases](https://github.com/fsnotify/fsnotify/releases) are tagged based on [Semantic Versioning](http://semver.org/). Further API changes are [planned](https://github.com/fsnotify/fsnotify/milestones), and will be tagged with a new major revision number.\n\nGo 1.6 supports dependencies located in the `vendor/` folder. Unless you are creating a library, it is recommended that you copy fsnotify into `vendor/github.com/fsnotify/fsnotify` within your project, and likewise for `golang.org/x/sys`.\n\n## Contributing\n\nPlease refer to [CONTRIBUTING][] before opening an issue or pull request.\n\n## Example\n\nSee [example_test.go](https://github.com/fsnotify/fsnotify/blob/master/example_test.go).\n\n## FAQ\n\n**When a file is moved to another directory is it still being watched?**\n\nNo (it shouldn't be, unless you are watching where it was moved to).\n\n**When I watch a directory, are all subdirectories watched as well?**\n\nNo, you must add watches for any directory you want to watch (a recursive watcher is on the roadmap [#18][]).\n\n**Do I have to watch the Error and Event channels in a separate goroutine?**\n\nAs of now, yes. Looking into making this single-thread friendly (see [howeyc #7][#7])\n\n**Why am I receiving multiple events for the same file on OS X?**\n\nSpotlight indexing on OS X can result in multiple events (see [howeyc #62][#62]). A temporary workaround is to add your folder(s) to the *Spotlight Privacy settings* until we have a native FSEvents implementation (see [#11][]).\n\n**How many files can be watched at once?**\n\nThere are OS-specific limits as to how many watches can be created:\n* Linux: /proc/sys/fs/inotify/max_user_watches contains the limit, reaching this limit results in a \"no space left on device\" error.\n* BSD / OSX: sysctl variables \"kern.maxfiles\" and \"kern.maxfilesperproc\", reaching these limits results in a \"too many open files\" error.\n\n[#62]: https://github.com/howeyc/fsnotify/issues/62\n[#18]: https://github.com/fsnotify/fsnotify/issues/18\n[#11]: https://github.com/fsnotify/fsnotify/issues/11\n[#7]: https://github.com/howeyc/fsnotify/issues/7\n\n[contributing]: https://github.com/fsnotify/fsnotify/blob/master/CONTRIBUTING.md\n\n## Related Projects\n\n* [notify](https://github.com/rjeczalik/notify)\n* [fsevents](https://github.com/fsnotify/fsevents)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuswitch%2Ffsnotify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuswitch%2Ffsnotify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuswitch%2Ffsnotify/lists"}