Re: How to get bookmarks data for non-existing files
Re: How to get bookmarks data for non-existing files
- Subject: Re: How to get bookmarks data for non-existing files
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Thu, 09 Feb 2012 20:06:21 +0700
On 9 Feb 2012, at 10:33, Quincey Morris wrote:
> On Feb 8, 2012, at 18:20 , Gerriet M. Denkmann wrote:
>
>> The only keys which seem to work for an non-existing file seem to be:
>> NSURLNameKey
>> NSURLIsDirectoryKey
>> NSURLIsRegularFileKey
>> NSURLIsSymbolicLinkKey
>> NSURLIsVolumeKey
>> (I did try many, though not all).
>>
>> There is more info in the bookmarkData: like full path (this would be much more useful than just the NSURLNameKey), NSFileSystemFileNumber (probably not very useful in this case) and others.
>
> I happened to notice this today:
>
> -[NSURL bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:]
>
> which suggests to me that the availability of keys depends on how the bookmark was created. If these are bookmarks you've created for yourself, then presumably you can add the information you will want if the target file is missing.
No, these bookmarks are not created by me. They come from ~/Library/Preferences/com.apple.TextEdit.LSSharedFileList.plist.
Here is the content of a typical bookmark (zero bytes replaced by @):
Version → 0x10010000
Path Array → /Volumes/เม่น/Users/gerriet/Source/Stuff 10.6.2/ไทย Dict Wv/Agenda.rtf
Nodes Array → 497483, 2, 27, 2064, 55998, 2995129, 3624409, 7153541
0x1010 → @@@@@@@@@@@@@@@@@@@@@@
0x2000 → 61440, 0, 1, 0, 0, 0, 0, 0, 0
0x2002 → /Volumes/เม่น
0x2010 → เม่น
0x2011 → 506E1F67-24E9-336E-89FC-8F6904D2FE79
0x2012 → 51539607552
0x2013 → 751533532737
0x2020 → @@@@@ï?@@@@@@@@@@@@
0xf080 → 3063f07b476c97a843db5b50742185c6499849c7;00000000;00000000;00000020;com.apple.app-sandbox.read-write;000000000e000004;00000000006d2785;@
Any ideas what these keys might mean?
Kind regards,
Gerriet.
_______________________________________________
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