Problem: I have to automatically mirror 2 folders, /A and /B, such a way they contains the same files and folders.
- So I FSEventStreamCreate with kFSEventStreamEventIdSinceNow, kFSEventStreamCreateFlagWatchRoot and a 2 seconds latency time. - I get a notification: there is a new file to copy from /A to /B. I copy the file, but I quickly get a new notification that there is a new file in B. Well, this notification is useless to me. I copied that file. Therefore I don't need to copy it again. - So, before I copy the file, I thought, I stop and invalidate the stream, then I copy the file, then I turn the stream on again. But here I get 2 problems: 1) At the end of the copyFile, I turn the stream on again, and the Finder, a couple of seconds later (but it could even be shorter or longer) updates the /B/.DS_Store file so I get a new notification. How to force the Finder to update the .DS_Store file immediately after the copy? Or should I use a longer latency time? How long? 2) During the period of time the stream is off, if some new files arrive within the folder /A, I lose the notification to copy it. How to workaround that? Regards -- Leonardo _______________________________________________ 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