How to make fsnotifier watch a specific directory?

Hi,

I have been implementing a python script that uses the fsnotifier to watch a specific directory for changes. The script works fine, but I'm having trouble telling fsnotifier what directory I want to watch. I have tried using the ROOTS command, but it seems that I get notifications on changes in other directories as well.

Example:

C:\Program Files (x86)\JetBrains\IntelliJ IDEA 9.0.2\bin>fsnotifier.exe
ROOTS
C:\test
#
UNWATCHEABLE
#
REMAP
#
CHANGE
C:\Users\Markus Kristo\AppData\Roaming\Skype\xyz\main.db-journal
CHANGE
C:\Users\Markus Kristo\AppData\Roaming\Skype\xyz\main.db-journal



As you can see by the example above, fsnotifier actually triggers on changes in other directories.

So, the question is; how do I make fsnotifier watch a specific directory?

Thanks,
Markus Kristo
www.esn.me
2 comments

Hello Markus,

The Windows fsnotifier always reports changes to all files on the selected
drives; the ROOTS command is used only to determine which drives should be
watched. In IDEA, filtering for relevant events is done by Java code.

I have been implementing a python script that uses the fsnotifier to
watch a specific directory for changes. The script works fine, but I'm
having trouble telling fsnotifier what directory I want to watch. I
have tried using the ROOTS command, but it seems that I get
notifications on changes in other directories as well.

Example:

C:\Program Files (x86)\JetBrains\IntelliJ IDEA
9.0.2\bin>fsnotifier.exe
ROOTS
C:\test
#
UNWATCHEABLE
#
REMAP
#
CHANGE
C:\Users\Markus Kristo\AppData\Roaming\Skype\xyz\main.db-journal
CHANGE
C:\Users\Markus Kristo\AppData\Roaming\Skype\xyz\main.db-journal
As you can see by the example above, fsnotifier actually triggers on
changes in other directories.

So, the question is; how do I make fsnotifier watch a specific
directory?

Thanks,
Markus Kristo
www.esn.me
---
Original message URL:
http://www.jetbrains.net/devnet/message/5262863#5262863

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Thanks for the answer!

Regards,
Markus Kristo

0

Please sign in to leave a comment.