https://github.com/tywkeene/go-fsevents
Recursive filesystem event watcher using inotify in golang
https://github.com/tywkeene/go-fsevents
filesystem-events filesystem-interaction golang golang-package inotify
Last synced: 8 months ago
JSON representation
Recursive filesystem event watcher using inotify in golang
- Host: GitHub
- URL: https://github.com/tywkeene/go-fsevents
- Owner: tywkeene
- License: mit
- Created: 2017-03-06T23:10:09.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-02-25T03:59:35.000Z (almost 3 years ago)
- Last Synced: 2024-11-05T21:44:40.138Z (about 1 year ago)
- Topics: filesystem-events, filesystem-interaction, golang, golang-package, inotify
- Language: Go
- Homepage:
- Size: 2.44 MB
- Stars: 120
- Watchers: 8
- Forks: 18
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# go-fsevents
[](https://godoc.org/github.com/tywkeene/go-fsevents)
[](https://travis-ci.org/tywkeene/go-fsevents)

[](https://opensource.org/licenses/MIT)
[](https://goreportcard.com/report/github.com/tywkeene/go-fsevents)
# About
Recursive filesystem event watcher using inotify in golang
go-fsevents provides functions necessary for monitoring filesystem events on Linux systems using the [inotify interface](https://en.wikipedia.org/wiki/Inotify).
Unlike other inotify packages, go-fsevents provides a recursive watcher, allowing the monitoring of directory trees easily.
## UNSTABLE
The package is currently unstable, and as such should not be used in any production environment.
Many changes, additions and breaking refactors will take place between now and the stable 1.0.0 release.
You have been warned.
## Features
- Single directory event monitoring
- Recursive directory tree event monitoring
- EventHandle interface to allow for clean and concise handling of events
- Access to the underlying raw inotify event through the [unix](https://godoc.org/golang.org/x/sys/unix) package
- Predefined event translations. No need to fuss with raw inotify flags.
- Concurrency safe
## Examples
See the examples in [examples](https://github.com/tywkeene/go-fsevents/blob/master/examples) for quick and easy runnable examples of how go-fsevents can be used in your project
`handlers.go` describes how to use the `EventHandlers` interface to handle events automatically
`loop.go` describes how to read events from the `watcher.Events` channel