Hello,

I have setup an FSEventStream so that I can monitor a directory for file 
changes. If the root directory that is being watched is moved/renamed, I want 
to be able to keep monitoring the directory.  I am able to get the new path of 
the root directory, however I am unsure of how to monitor the new path. If I 
try to stop monitoring the watched directory (so I can subsequently monitor the 
new root directory path), the following error message is logged to my console:

(CarbonCore.framework) process_dir_events: watch_path: error trying to add 
kqueue for fd 5 (/Users/path/to/orig/dir; Bad file descriptor)
(CarbonCore.framework) process_dir_events: watch_path: error removing fd 6 from 
kqueue (Bad file descriptor)
(CarbonCore.framework) process_dir_events: watch_all_parents: error trying to 
add kqueue for fd 6 (/Users/path/to/orig; Bad file descriptor)
(CarbonCore.framework) process_dir_events: watch_all_parents: error trying to 
add kqueue for fd 7 (/Users/path/to; Bad file descriptor)
(CarbonCore.framework) process_dir_events: watch_all_parents: error trying to 
add kqueue for fd 8 (/Users/path; Bad file descriptor)
(CarbonCore.framework) process_dir_events: watch_all_parents: error trying to 
add kqueue for fd 9 (/Users; Bad file descriptor)

I'd appreciate if someone can suggest a way to monitor the new directory path 
(and stop monitoring the original location) when receiving a 
kFSEventStreamEventFlagRootChanged flag.  If invalidating and stopping the 
stream (then restarting it) is the way to go, perhaps someone could shed some 
light as to why I'm receiving the error mentioned above.

A similar question has been asked (but not yet solved) in the following thread:
http://lists.apple.com/archives/filesystem-dev/2010/May/msg00007.html

Ajay
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to