Re: FSRef -> NSString
Re: FSRef -> NSString
- Subject: Re: FSRef -> NSString
- From: Chris Hanson <email@hidden>
- Date: Thu, 16 Jan 2003 03:28:57 -0600
At 9:21 AM +0100 1/16/03, email@hidden wrote:
convert the FSRef to a CFURLRef , cast the CFURLRef to a NSURL (this
part is optional) and use the NSURL method to get he Posix path name
in a NSString.
Alternately, use my BDAlias class.
Construct a BDAlias with the FSRef, then ask it for the full path:
NSString *path = [[BDAlias aliasWithFSRef:&someFSRef] fullPath];
You can also save and restore the alias as an NSData, so you don't
store (fragile) textual paths in data files, preferences, etc.
BDAlias is at <
http://www.bdistributed.com/Projects/BDAlias/>.
-- Chris
--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Custom Application Development | Phone: +1-847-372-3955
http://bdistributed.com/ | Fax: +1-847-589-3738
http://bdistributed.com/Articles/ | Personal Email: 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.