• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: kFSEventStreamEventFlagItemRenamed is for rename or trash ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: kFSEventStreamEventFlagItemRenamed is for rename or trash ?
      • From: Sean McBride <email@hidden>
References: 
 >kFSEventStreamEventFlagItemRenamed is for rename or trash ? (From: Alfian Busyro <email@hidden>)
 >Re: kFSEventStreamEventFlagItemRenamed is for rename or trash ? (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: iOS 6 changes in CATextLayer text drawing
  • Next by Date: static void declaration in apple example code
  • Previous by thread: Re: kFSEventStreamEventFlagItemRenamed is for rename or trash ?
  • Next by thread: Re: kFSEventStreamEventFlagItemRenamed is for rename or trash ?
  • Index(es):
    • Date
    • Thread