Re: kFSEventStreamEventFlagItemRenamed is for rename or trash ?
Re: kFSEventStreamEventFlagItemRenamed is for rename or trash ?
- Subject: Re: kFSEventStreamEventFlagItemRenamed is for rename or trash ?
- From: Kyle Sluder <email@hidden>
- Date: Thu, 11 Oct 2012 08:16:06 -0700
On Thu, Oct 11, 2012, at 03:01 AM, Alfian Busyro wrote:
> So what is the differences between these two events (rename and trash) ?
There is no difference. The Trash is an abstraction built atop the
filesystem. As far as FSEvents is concerned, there's no such thing as
the Trash. There's just a move of a file to /.Trashes/blah_blah_blah.
> In other word, how I can recognize these two events ?
After you're told a file has moved, get all the Trash directories using
-[NSFileManager URLsForDirectory:inDomains:] and see if the file is a
descendant of any one of them.
Then file a bug asking for a simpler API.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden