Re: Trying to create an alias file by using the new NSURL methods available with Mac OS X 10.6 !
Re: Trying to create an alias file by using the new NSURL methods available with Mac OS X 10.6 !
- Subject: Re: Trying to create an alias file by using the new NSURL methods available with Mac OS X 10.6 !
- From: "Sean McBride" <email@hidden>
- Date: Wed, 13 Jan 2010 18:19:26 -0500
- Organization: Rogue Research Inc.
On 1/13/10 10:42 PM, rohan a said:
>int CreateAlias(const char *target, const char *aliasname)
>{
> CFStringRef Ref1 = CFStringCreateWithCString(NULL, target,
>kCFStringEncodingASCII);
Don't use kCFStringEncodingASCII, filenames can have non-ASCII characters.
Save yourself the trouble of all these conversions, and just use the
NDAlias classes/categories. See here:
<http://github.com/nathanday/ndalias>
It doesn't currently support bookmarks, but a patch would be welcome
(and pretty easy to add)!
>Would it be possible to create an alias for a non-existent file ?
No. But if its parent folder exists, you could create an alias to the
parent folder and store the filename.
Lastly, please don't post the same message to two lists. Not everyone
is subscribed to both.
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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