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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to