by David Phillip Oster <oster@[EMAIL PROTECTED]
>
Apr 20, 2008 at 08:34 PM
In article
<01958e21-e0da-43ef-af0a-208b6d6bb29c@[EMAIL PROTECTED]
>,
Bert <tsingyoung@[EMAIL PROTECTED]
> wrote:
> hi, all
> how to convert a UNC path to local path on Mac?
> For example:
> convert "\\server1\sharefolder\file1.txt" to "/Volumes/server1/
> file1.txt"?
>
> and how to convert it back? any clue?
> thanks in advance
>
> bert
UNCs aren't a Unix or Mac concept. In Objective-C Cocoa, you'd normally
use an NSURL, as in:
NSURL *url = [NSURL fileURLWithPath:@[EMAIL PROTECTED]
"/Volumes/server1/file1.txt"];
NSString *filePath = [url path];
NSURLs are toll-free bridged to CFURLRef and NSStrings to CFStringRef,
if that helps any.