Re: kFSEventStreamEventFlagItemRenamed is for rename or trash ?
Re: kFSEventStreamEventFlagItemRenamed is for rename or trash ?
- Subject: Re: kFSEventStreamEventFlagItemRenamed is for rename or trash ?
- From: Alfian Busyro <email@hidden>
- Date: Fri, 12 Oct 2012 15:30:56 +0900
Hi Kyle,
Thanks for your respond.
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.
would you mind to give me a simple example of this method ?
after I investigate this method, I can't find trash directory for
NSSearchPathDirectory parameter.
Best Regards,
Alfian
On 12/10/12 0:16, Kyle Sluder wrote:
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