• 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
dealing with alias files, finding URL to target file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dealing with alias files, finding URL to target file


  • Subject: dealing with alias files, finding URL to target file
  • From: Sean McBride <email@hidden>
  • Date: Fri, 15 Apr 2011 11:20:15 -0400
  • Organization: Rogue Research Inc.

Hi all,

Of late, I've been working to remove NSString-based paths, FSRefs, and
Alias Manager usage in my code, in favour of NSURL.

But I'm having trouble with alias files.

NSOpenPanel helpfully, by default, resolves aliases before it returns
the URL to you.  But NSPathControl does not and file drops that you get
off NSPasteboard also do not.  So in many cases I need to manually check
if a URL points to an alias file, and find the file it points to.  Am I
missing an easy/modern way to do this?

There's URLByResolvingSymlinksInPath and URLByStandardizingPath, but
neither resolve alias files (not that their docs say they should, but
I'm experimenting).

The only choice I see is using getResourceValue:forKey:error: and
NSURLIsAliasFileKey then using all the bookmark APIs.  Blah.  Am I
missing something?

Thanks,

--
____________________________________________________________
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: dealing with alias files, finding URL to target file
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: Error validating email addresses in Core Data
  • Next by Date: Re: dealing with alias files, finding URL to target file
  • Previous by thread: Re: Error validating email addresses in Core Data
  • Next by thread: Re: dealing with alias files, finding URL to target file
  • Index(es):
    • Date
    • Thread