• 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: POSIX Path to HFS?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: POSIX Path to HFS?


  • Subject: Re: POSIX Path to HFS?
  • From: Finlay Dobbie <email@hidden>
  • Date: Thu, 4 Apr 2002 13:22:14 +0100

On Thursday, April 4, 2002, at 03:20 AM, Rich Long wrote:

I'd like to convert this to HFS format (for example: Macintosh HD:foo:bar.txt), but I can't seem to find a routine that would let me do it.

See CFURL.h

Something like this:
NSString *posixPath; // assume this exists
NSString *hfsPath;
CFURLRef myURL = CFURLCreateWithFileSystemPath(NULL, (CFStringRef)posixPath, kCFURLPOSIXPathStyle, NO);

hfsPath = (NSString *)CFURLCopyFileSystemPath(myURL, kCFURLHFSPathStyle);

NSLog(@"posix path is \"%@\", hfs path is \"%@\"", posixPath, hfsPath);

CFRelease(myURL);
[hfsPath release];

(warning: typed off the top of my head, may or may not work).

-- Finlay
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: POSIX Path to HFS?
      • From: Rosyna <email@hidden>
References: 
 >POSIX Path to HFS? (From: Rich Long <email@hidden>)

  • Prev by Date: Re: Moving the Dev Tools Docs?
  • Next by Date: Re: Resource Management ??
  • Previous by thread: Re: POSIX Path to HFS?
  • Next by thread: Re: POSIX Path to HFS?
  • Index(es):
    • Date
    • Thread