Re: How to read a text file over a network
Re: How to read a text file over a network
- Subject: Re: How to read a text file over a network
- From: Nick Zitzmann <email@hidden>
- Date: Tue, 14 Dec 2010 00:05:26 -0700
On Dec 13, 2010, at 10:12 PM, Abhijeet Singh wrote:
> I think the type of server is AFP. Because the file path displayed by Finder is: afp://PriyankaMac._afpovertcp._tcp.local/shared/file1.txt.
> But if i put the same file path in my file2.txt my program fails to open file1.txt file.
That's most likely because that's an afp: URL, and you need to use file: URLs with NSURL, etc. Once the disk is mounted, its path will start with /Volumes/{name of disk as it appears in the Finder} in the general case, but if a volume with the same name is mounted, then its path will most likely be slightly different, so you might need to use the DiskArbitration framework in order to get a good path...
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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