Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Objective-c > Re: how to conv...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 971 of 1055
Post > Topic >>

Re: how to convert between local path

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.
 




 2 Posts in Topic:
how to convert between local path
Bert <tsingyoung@[EMAI  2008-04-14 00:33:07 
Re: how to convert between local path
David Phillip Oster <o  2008-04-20 20:34:23 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 6:39:34 CST 2008.