Move a folder and update corresponding Finder sidebar favorite

2015-05-20 Thread Ben Staveley-Taylor
I’m having trouble moving folders around if there is a Finder sidebar favorite pointing to that folder — the favorite gets deleted sometimes, if it is a move rather than a rename. I’d like to find a robust method that updates the favorite to point to the new location. Suppose you have a folder

Re: Is it possible to read your own quarantine info after launch?

2014-11-29 Thread Ben Staveley-Taylor
to host a different build, but probably a config file is the way to go. — Ben. On 28 Nov 2014, at 22:18, Ken Thomases wrote: > On Nov 28, 2014, at 10:14 AM, Ben Staveley-Taylor > wrote: > >> I want to determine from which server my application was downloaded, on its >>

Is it possible to read your own quarantine info after launch?

2014-11-28 Thread Ben Staveley-Taylor
I want to determine from which server my application was downloaded, on its first use. (The app is hosted on many servers and I want to work out which one to connect back to.) The Mac OS adds quarantine info to downloaded files. This is handled by Launch Services, so I can use LSCopyItemAttribu

Finder Tags API

2014-03-17 Thread Ben Staveley-Taylor
I’m trying to understand the Finder Tags APIs in Mavericks. I would like to set a custom Finder Tag on a number of files, ensure it appears in the Finder sidebar tag set, and assign it a color so the user can gather the files easily in the Finder. My application is a file manager and moves files

How to create a Tags selection field in a dialog

2014-03-17 Thread Ben Staveley-Taylor
I’m considering making use of the Finder Tags functionality in Mavericks but the APIs seem a little sparse. I want to create a UI with a field like the Tags: field on the Save As dialog so I can ask the user “Which tags do you want to use on files of this purpose?” This would not be at the poin

Re: How to discover the volume id to use in a File Reference URL

2013-09-25 Thread Ben Staveley-Taylor
I did an informal time test on the path resolution using NSURL with a known ID, like this: NSURL *itemRefUrl = [NSURL URLWithString:@"file:///.file/id=1234.5678/"]; NSString *itemPath = [[itemRefUrl filePathURL] path]; I realise now that creating a file reference URL from a lite

Re: How to discover the volume id to use in a File Reference URL

2013-09-24 Thread Ben Staveley-Taylor
4 Sep 2013, at 09:54, Ken Thomases wrote: > On Sep 24, 2013, at 3:24 AM, Ben Staveley-Taylor wrote: > >> The reason I want to do this is to discover the textual path of a file given >> its file ID (and a volume name). > >> So I suppose my real question is how to fi

Re: How to discover the volume id to use in a File Reference URL

2013-09-24 Thread Ben Staveley-Taylor
at 11:14 AM, Ben Staveley-Taylor wrote: > >> Does anyone know how to get the volume ID number to use in a reference URL? >> >> I am working with file reference URLs as returned by - (NSURL >> *)fileReferenceURL. These have this textual form: >> >&g

How to discover the volume id to use in a File Reference URL

2013-09-24 Thread Ben Staveley-Taylor
ID fields, but these don't give me the number I need either. Thanks, Ben Staveley-Taylor ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators a

Re: LSSharedFileListInsertItemURL does not honor the display name or icon

2013-01-03 Thread Ben Staveley-Taylor
I thought I would share further information on this topic to help others who may come across this thread in the archives. I couldn't figure this out and found several similar bug reports from other developers in various forums, so I took the plunge and asked DTS. The official response is that:

LSSharedFileListInsertItemURL does not honor the display name or icon

2012-12-17 Thread Ben Staveley-Taylor
I am trying to add a new item to the Finder Sidebar Favorites kLSSharedFileListFavoriteItems list. The API for doing this, LSSharedFileListInsertItemURL, is not working for me. The Sidebar folder is created, but with a generic folder icon and the name taken from the target folder instead of the

Re: Finder Integration

2011-10-03 Thread Ben Staveley-Taylor
Finder icon badging ('badg' resource) is not that much use these days because most file icons are no longer static but are generated by QuickLook on the fly, except in the smallest of views. QuickLook does not honour the 'badg' resource, I've been told. Another reason that a badg resource is no