Skip navigation.
 
mlRe: Using UNCs with NSURLConnection
FROM : Jens Alfke
DATE : Tue Apr 01 18:14:35 2008

On 1 Apr '08, at 8:42 AM, Valentin Dan wrote:

> I’d like to know if there’s any way to use a UNC path with a 
> NSURLConnection object ? Can the UNC perhaps be transformed in a 
> NSURL ?


I had to look up UNC on Wikipedia; I think what you're talking about 
is a type of path string used on Windows to identify resources on a 
network?
   http://en.wikipedia.org/wiki/Path_%28computing%29#Uniform_Naming_Convention

The issue here isn't the syntax, it's the protocol. Since this is from 
Windows, I'd guess that resolving a UNC involves some combination of 
ActiveDirectory to locate resources on the network, and SMB to access 
the files. Mac OS X has some support for ActiveDirectory (via 
OpenDirectory APIs) and SMB (presumably using Unix system calls to 
mount filesystems).

But I'm pretty certain that, even if you could map a UNC into a URL, 
NSURLConnection doesn't support the URL schemes needed to access it. 
Out of the box it basically supports http:, https:, ftp: and file:.

You could try some web-searching to see if anyone else has written Mac 
code to work with UNCs.

—Jens

Related mailsAuthorDate
mlUsing UNCs with NSURLConnection Valentin Dan Apr 1, 17:42
mlRe: Using UNCs with NSURLConnection Jens Alfke Apr 1, 18:14