Re: Another filesystem mystery
Re: Another filesystem mystery
- Subject: Re: Another filesystem mystery
- From: Kurt Revis <email@hidden>
- Date: Tue, 26 Feb 2002 15:45:25 -0800
On Tuesday, February 26, 2002, at 11:38 AM, Finlay Dobbie wrote:
On Tuesday, February 26, 2002, at 05:37 AM, email@hidden wrote:
I've just bumped into the problem that
-stringByResolvingSymlinksInPath doesn't resolve alias files, and that
such alias files then say they are files even if they point to
directories. Apparently I need to resolve such aliases by hand. I've
just logged a bug that Cocoa ought to make this issue more or less
completely invisible, at least when -stringByResolvingSymlinksInPath
is used. Sigh.
http://bdistributed.com/Projects/BDAlias/
Well, that gets you about halfway there. BDAlias is useful for using
alias *records*, but it won't directly resolve the Finder's alias
*files* for you. (I think the fact that the Finder alias files contain
alias records internally is considered an implementation detail, subject
to change.)
You can use FSResolveAliasFile() (or related functions) in Carbon to
resolve alias files. Note that there are various complications with
this, if the alias points to something on a server that needs to be
mounted (which might require asking for a password), and so on. I
haven't yet seen a Cocoa class to do this, and I agree that Apple should
be the ones providing it.
(BDAlias will at least give you a good example of using the Carbon Alias
Manager, though.)
--
Kurt Revis
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.