• 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: Creating alias programatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating alias programatically


  • Subject: Re: Creating alias programatically
  • From: chaitanya pandit <email@hidden>
  • Date: Wed, 24 Sep 2008 02:18:22 +0530

I tried using:
OSErr FSNewAliasFromPath ( const char *fromFilePath, const char *targetPath, OptionBits flags, AliasHandle *inAlias, Boolean *isDirectory );
But i don't quite get how should i use the fromFilePath parameter,
say i want to create an alias for "Users/me/Documents/foo" at "Users/ me/Desktop/foo"
should i pass the first path as "fromFilePath"?
I appreciate your help.
Chaitanya
On 24-Sep-08, at 2:09 AM, Nick Zitzmann wrote:



On Sep 23, 2008, at 2:32 PM, chaitanya pandit wrote:

I tried using symbolic link, but if the target file is moved, the link fails, just curious to know of any reasons i should avoid creating aliases?
What i need is the link should work even if the target is moved.


Because aliases are only resolved by some Carbon and AppKit methods. Foundation, CoreFoundation, and C library functions like fopen() won't resolve aliases, but will resolve symbolic links. If this is important to you, then you should use symbolic links instead of aliases. If not, then go ahead and use aliases.

Nick Zitzmann
<http://www.chronosnet.com/>


_______________________________________________

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: Creating alias programatically
      • From: Nick Zitzmann <email@hidden>
References: 
 >Creating alias programatically (From: chaitanya pandit <email@hidden>)
 >Re: Creating alias programatically (From: Nick Zitzmann <email@hidden>)
 >Re: Creating alias programatically (From: chaitanya pandit <email@hidden>)
 >Re: Creating alias programatically (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: Creating alias programatically
  • Next by Date: Re: Creating alias programatically
  • Previous by thread: Re: Creating alias programatically
  • Next by thread: Re: Creating alias programatically
  • Index(es):
    • Date
    • Thread