• 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: FSEventStream and rename notifications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FSEventStream and rename notifications


  • Subject: Re: FSEventStream and rename notifications
  • From: Jim Luther <email@hidden>
  • Date: Mon, 07 Mar 2016 12:08:23 -0800

On Mar 7, 2016, at 10:29 AM, Thomas Tempelmann <email@hidden> wrote:

On Mon, Mar 7, 2016 at 7:04 PM, James Bucanek <email@hidden> wrote:
That is, I can create a bookmark for a file, rename/move that file, and the bookmark will still find it.

A problem only comes up when the user moves or renames the file and then creates a new file in the original place, and then you try to resolve the bookmark. At that point, we should be able to choose whether to prefer the item found by its ID or by its path. And if I understand Jim right, then this isn't possible any more - the OS makes a choice for us, and we don't know which (well, we can find out empirically).

Paths are always preferred over fileIDs during bookmark resolution. Resolving by fileID is a fallback when nothing is found at the path.

At least, for now, bookmark files still use the old Alias record format, and I've specifically written my own code to decypher them in order to be able to extract both the path and the ID so that I can find the file myself using the way of my choice. In fact, it allows me to detect if there's a file at both places, and I can alert the user to give him the choice.

The last version of OSX which wrote Alias Manager alias records into files with CFURLWriteBookmarkDataToFile() or +[NSURL writeBookmarkData:toURL:options:error:] was OSX 10.9. In OSX 10.10 and later, those files have no resource fork (and thus no 'alis' resource).

But once Apple changes the format as well, I'm screwed, I guess.

--
Thomas Tempelmann, http://www.tempel.org/
Follow me on Twitter: https://twitter.com/tempelorg
Read my programming blog: http://blog.tempel.org/
Do not post admin requests to the list. They will be ignored. Filesystem-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >FSEventStream and rename notifications (From: tridiak <email@hidden>)
 >Re: FSEventStream and rename notifications (From: tridiak <email@hidden>)
 >Re: FSEventStream and rename notifications (From: James Bucanek <email@hidden>)
 >Re: FSEventStream and rename notifications (From: Jim Luther <email@hidden>)
 >Re: FSEventStream and rename notifications (From: James Bucanek <email@hidden>)
 >Re: FSEventStream and rename notifications (From: Thomas Tempelmann <email@hidden>)

  • Prev by Date: Re: FSEventStream and rename notifications
  • Previous by thread: Re: FSEventStream and rename notifications
  • Next by thread: Re: FSEventStream and rename notifications
  • Index(es):
    • Date
    • Thread