Accessing a windows share
Accessing a windows share
- Subject: Accessing a windows share
- From: "Valentin Dan" <email@hidden>
- Date: Wed, 2 Apr 2008 01:59:27 -0400
- Thread-topic: Accessing a windows share
Hi,
Same question with a new spin :) ...
How can I access (from Cocoa, Objective-C code) a path like : \\192.1.1.1\c$\SomeDir\AnotherOne\SomePicture.jpg ?
I need to load that picture in a table view, so I need the NSData object and the connection should be able to authenticate (perhaps a NSURLConnection ?).
Thanks !
___________________________________________________________________
Valentin Dan, Software Developer Direct: +1 905 886 1833 ext.3047
Email: email@hidden Office: +40 356-710158
Masstech Group Inc. Fax: +40 256-220912
http://www.masstechgroup.com
THIS MESSAGE IS INTENDED ONLY FOR THE ADDRESSEE. IT MAY CONTAIN PRIVILEGED OR CONFIDENTIAL INFORMATION.ANY UNAUTHORIZED DISCLOSURE IS STRICTLY PROHIBITED.IF YOU HAVE RECEIVED THIS MESSAGE IN ERROR, PLEASE NOTIFY US IMMEDIATELY SO THAT WE MAY CORRECT THE RECORDS. PLEASE THEN DELETE THE ORIGINAL MESSAGE. THANK YOU.
-----Original Message-----
From: Jens Alfke [mailto:email@hidden]
Sent: 1 aprilie 2008 19:15
To: Valentin Dan
Cc: email@hidden; Constantin Sirb; Dan Tascau
Subject: Re: Using UNCs with NSURLConnection
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_(computing)#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
No virus found in this incoming message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.22.2/1353 - Release Date: 31.03.2008 18:21
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.22.2/1353 - Release Date: 31.03.2008 18:21
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden