Re: Accessing a windows share
Re: Accessing a windows share
- Subject: Re: Accessing a windows share
- From: Jens Alfke <email@hidden>
- Date: Wed, 2 Apr 2008 07:49:14 -0700
On 1 Apr '08, at 10:59 PM, Valentin Dan wrote:
How can I access (from Cocoa, Objective-C code) a path like : \
\192.1.1.1\c$\SomeDir\AnotherOne\SomePicture.jpg ?
Well, you know the IP address of the server, and the path in its
filesystem. That's a start. The key question is: what protocol? Again,
I think the answer is "SMB". So I think what you need to do is find
out how to mount an SMB volume programmatically. Once you've done that
you can translate the path to Unix syntax, prepend the system path to
the mount point of the volume, and now you have a filesystem path to
the resource that you can access with something like +[NSData
dataWithContentsOfFile:].
There aren't any Cocoa APIs for mounting filesystems, so you're going
to have to investigate lower-level APIs, either CoreServices or BSD/
POSIX. (And this isn't the appropriate mailing list for that.) Look
through the online reference documents in Xcode, or if that fails,
look at the list of other mailing lists on http://lists.apple.com to
find a place to ask.
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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