Re: How to tell if file wrapper represents package
Re: How to tell if file wrapper represents package
- Subject: Re: How to tell if file wrapper represents package
- From: Mike Abdullah <email@hidden>
- Date: Sun, 14 Jul 2013 17:33:30 +0100
On 14 Jul 2013, at 08:40, Shane Stanley <email@hidden> wrote:
> On 14/07/2013, at 1:30 PM, Lee Ann Rucker <email@hidden> wrote:
>
>> Haven't tried it, but [NSWorkspace isFilePackageAtPath:] looks like what you want. If that's not sufficient, there are other things in NSWorkspace that test files.
>
> The problem, though, is that a file wrapper doesn't have a path.
I think you have a couple of options, neither terribly satisfactory:
A) Use the .filename property to work your way through the wrappers and build up the expected URL/path of the file. Then query that to know if it's a package.
B) Grab NSFileSystemFileNumber from the package, and use it to locate the file on disk, querying that.
_______________________________________________
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