Fsnotifier on mac?

IntelliJ has an application to notify it, when files on the disk have changed.
I downloaded the latest version for mac, from:
https://github.com/JetBrains/MPS/blob/master/bin/mac/fsnotifier
I have mac os 10.7.4 (tried also on 10.7.5)

Now when I try to add some directory to be watchable:
ROOTS
/Users/andres.luuk
#
I get:
UNWATCHABLE

Is this the same as in Windows, that the application watches the entire disc and always says UNWATCHABLE?

Additional problem I got was that it reports only DIRTY events. Is this normal that I don't get an other kind of events?

./fsnotifier --selftest seems also not to work for me, is this command missing from mac version or with a different name?

2 comments

The most recent version is at https://github.com/JetBrains/intellij-community/blob/master/bin/mac/fsnotifier.

It's same as on Windows, but it means a #-closed list of directories which fsnotifier is unable to watch because they're network mounts. So when it says "UNWATCHEABLE \n # \n" it means it can watch all requested directories. It watches entire disk as API streams all FS events and it was easier for us to filter them at IDE side.

AFAIK reporting only directories is a limitation of Mac's FSEvents API - please see the docs for details.

"--selftest" is only implemented in Linux version.

If you're interested in cross-platform filesystem events notification I may recommend to take a look at Java 7 Watch Service API.

0

Thanks for the answer.
I will use the newer version from that url.
I am aware of the Java7 implementation, but because I need it with older Java versions, it can't always be used.
Reporting only directories is ok and getting only dirty events can also be used.

0

Please sign in to leave a comment.