• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Trying to create an alias file by using the new NSURL methods available with Mac OS X 10.6 !
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Trying to create an alias file by using the new NSURL methods available with Mac OS X 10.6 !
      • From: rohan a <email@hidden>
  • Prev by Date: Re: Best practice example for a setup wizard?
  • Next by Date: set the label for the left hand expression / popup in an NSPredicateEditorRowTemplate?
  • Previous by thread: Image of minimized window using 10.4 APIs
  • Next by thread: Re: Trying to create an alias file by using the new NSURL methods available with Mac OS X 10.6 !
  • Index(es):
    • Date
    • Thread