• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to read a text file over a network
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: Re: How to read a text file over a network (From: "Abhijeet Singh" <email@hidden>)

  • Prev by Date: Re: Re: How to read a text file over a network
  • Next by Date: Re: Record indentifier and the truth
  • Previous by thread: Re: Re: How to read a text file over a network
  • Next by thread: Re: Re: How to read a text file over a network
  • Index(es):
    • Date
    • Thread