commit | c5335bbee2c0449af1f30cea3caa6a7be9e42efd | [log] [tgz] |
---|---|---|
author | Nathan Youngman <git@nathany.com> | Sat Dec 13 04:47:51 2014 |
committer | Nathan Youngman <git@nathany.com> | Sat Dec 13 06:13:37 2014 |
tree | 6cf955ec789d1a39837125d944657b60f39e8001 | |
parent | b26ce4f25b59a23443829c673303e439614eea0f [diff] |
kqueue: addWatch sometimes just watches deletions fix regression #48 When watching a directory with kqueue, fsnotify will watch all the files in it. This includes subdirectories, but it only watches for the subdirectory being deleted. This is to emulate the behavior of inotify on Linux. A bug in 4a0d1ae9df8c61fb8912829fc714f189358a3dc7 resulted in it watching that subdirectory for all events, so watching a single directory would result in more events than expected.
Go 1.3+ required.
Cross platform: Windows, Linux, BSD and OS X.
Adapter | OS | Status |
---|---|---|
inotify | Linux, Android* | Supported |
kqueue | BSD, OS X, iOS* | Supported |
ReadDirectoryChangesW | Windows | Supported |
FSEvents | OS X | Planned |
FEN | Solaris 11 | Planned |
fanotify | Linux 2.6.37+ | |
Polling | All | Maybe |
Plan 9 |
* Android and iOS are untested.
Please see the documentation for usage. Consult the Wiki for the FAQ and further information.
Two major versions of fsnotify exist.
fsnotify.v0 is API-compatible with howeyc/fsnotify. Bugfixes may be backported, but I recommend upgrading to v1.
import "gopkg.in/fsnotify.v0"
* Refer to the package as fsnotify (without the .v0 suffix).
fsnotify.v1 provides a new API based on this design document. You can import v1 with:
import "gopkg.in/fsnotify.v1"
Further API changes are planned, but a new major revision will be tagged, so you can depend on the v1 API.
master may have untagged changes. Use it to test the very latest code, but don't expect it to remain API-compatible:
import "github.com/go-fsnotify/fsnotify"
fsnotify is derived from code in the golang.org/x/exp package and it may be included in the standard library in the future. Therefore fsnotify carries the same LICENSE as Go. Contributors retain their copyright, so you need to fill out a short form before we can accept your contribution: Google Individual Contributor License Agreement.
Please read CONTRIBUTING before opening a pull request.
See example_test.go.