• 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
resolving aliases
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

resolving aliases


  • Subject: resolving aliases
  • From: Yvon Thoraval <email@hidden>
  • Date: Fri, 4 Aug 2006 09:06:49 +0200

Hey all,

i'm from the RubyCocoa side and want to resolve aliases.

for now, i'm able to do that in AppleScript and Perl but not in CocoaRuby, my goal ))

i've a look at the page <http://developer.apple.com/documentation/ Cocoa/Conceptual/LowLevelFileMgmt/Tasks/ResolvingAliases.html>

basically Mister Apple says :

- convert URL to FSRef ;
- resolve alias ;
- reverse convert FSRef to URL

looks simple ))

however, again from RubyCocoa side, i don't know how to get an FSRef from an URL

as far s i understood well, this is done by the method (?) "CFURLGetFSRef(url, &fsRef)"

afterwards i might resolve using "FSResolveAliasFille"

and convert back using "CFURLCreateFromFSRef(NULL, &fsRef);"

i know, also, that HSURL are interchangeable with CFURL.

what i don't know, at all, is the receiver of CFURLGetFSRef ???

i've tried :

fm=OSX::NSFileManager.defaultManager
url=OSX::NSURL.alloc.initFileURLWithPath(alias_file)
fsr=fm.fileSystemRepresentationWithPath(alias_file)

but fsr is (still?) a String... with the same value as alias_file...


the, i'm lost ;-)

Yvon
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: resolving aliases
      • From: Bill Bumgarner <email@hidden>
    • Re: resolving aliases
      • From: Jakob Olesen <email@hidden>
  • Prev by Date: Question about background updating of an NSTableView.
  • Next by Date: Re: Non-nil terminated C string to NSString
  • Previous by thread: Re: Re: Question about background updating of an NSTableView.
  • Next by thread: Re: resolving aliases
  • Index(es):
    • Date
    • Thread