Re: How to ResolvingSymlinksInPath ?
Re: How to ResolvingSymlinksInPath ?
- Subject: Re: How to ResolvingSymlinksInPath ?
- From: Charles Srstka <email@hidden>
- Date: Fri, 04 Nov 2016 09:17:25 -0500
> On Nov 3, 2016, at 10:39 PM, Ken Thomases <email@hidden> wrote:
>
> On Nov 3, 2016, at 10:08 PM, Gerriet M. Denkmann <email@hidden <mailto:email@hidden>> wrote:
>>
>> URLByResolvingAliasFileAtURL does almost the same, has no special behaviour with “/private”, and even can resolve an alias.
>> But: only when this alias is the final component of a path.
>> I.e. /path/aliasToFoo will be resolved to /path/foo; but /path/aliasToFoo/someFile will not.
>
> Paths "through" alias files make no sense. Nothing else in the system will resolve an alias there, so nothing will ever produce such a path. If your code is producing such paths, you should fix it, because nothing else will be able to process them.
Oh, and it isn’t quite true that *nothing* else on the system will be able to process paths through an alias; old-style HFS paths separated by the ‘:’ character do resolve through aliases if they go through the old-style Carbon file manager. You can test this yourself by writing an AppleScript like this:
tell application "Finder"
get file “Macintosh HD:path:to:someAlias:someFile.txt"
end tell
Replace ‘Macintosh HD’ with your boot disk’s name, and the rest by the appropriate filenames, and you should get a valid reference to the file.
Charles
_______________________________________________
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