• 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: rohan a <email@hidden>
  • Date: Thu, 14 Jan 2010 09:46:35 +0530

Hi,

Thanks for the response.

I used kCFStringEncodingASCII, since I am passing a char* strings for the
filename and alias name through my program.

Thanks

On Thu, Jan 14, 2010 at 4:49 AM, Sean McBride <email@hidden>wrote:

> 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: Kyle Sluder <email@hidden>
References: 
 >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>)

  • Prev by Date: setting a preference pane anchor name
  • Next by Date: Framework soft link (optional install)
  • Previous by thread: Re: Trying to create an alias file by using the new NSURL methods available with Mac OS X 10.6 !
  • 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