• 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: 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

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

  • Prev by Date: copy in WebView
  • Next by Date: copy in WebView
  • Previous by thread: kFSEventStreamEventFlagItemRenamed is for rename or trash ?
  • Next by thread: Re: kFSEventStreamEventFlagItemRenamed is for rename or trash ?
  • Index(es):
    • Date
    • Thread