Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Introduce FSEvents support for directory watcher on mac #2023

Closed
paulmillr opened this issue Nov 5, 2011 · 3 comments
Closed

Introduce FSEvents support for directory watcher on mac #2023

paulmillr opened this issue Nov 5, 2011 · 3 comments

Comments

@paulmillr
Copy link

inotify is a great and fast library for watching file system changes on Linux. Though, it doesn't work on macs.

Mac OS X 10.5+ has built-in support of very similar technology, called FSEvents.

I propose to add its support to node.

@bnoordhuis
Copy link
Member

We use kqueue on darwin, which is similar to inotify and more portable than fsevents. It's what the freebsd port uses, for example.

@paulmillr
Copy link
Author

I believe this should be reopened because of #2062.

kqueue sucks: it doesn't provide filename on os x etc.

//cc @ricardobeat

@bnoordhuis
Copy link
Member

kqueue sucks: it doesn't provide filename on os x etc.

Let's turn that around. FSEvents sucks: it doesn't let you watch individual files. A hybrid approach would be susceptible to race conditions.

kqueue vs. FSEvents has been discussed a couple of times. The current consensus is that the pro's don't outweigh the cons (and that all file event APIs suck). We may revisit it some time in the future.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants