• 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: arrayWithContentsOfFile
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: arrayWithContentsOfFile


  • Subject: Re: arrayWithContentsOfFile
  • From: Jens Alfke <email@hidden>
  • Date: Tue, 13 Oct 2009 11:54:33 -0700


On Oct 13, 2009, at 11:49 AM, I. Savant wrote:

Nope. The docs are correct and I'm betting the file you specified in fact *doesn't* exist.

The docs say it returns nil if the file doesn't exist, and he's getting an empty array. That was his question.


"/Documents/file.plist" is probably not a valid path. You probably meant "~/Documents/file.plist", but that string isn't a valid path either. Use the appropriate path-manipulating NSString methods to expand the tilde to a full "/Users/someuser/..." path.

You must have misread his code — he's using NSHomeDirectory() as a prefix.


—Jens_______________________________________________

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


  • Follow-Ups:
    • Re: arrayWithContentsOfFile
      • From: "I. Savant" <email@hidden>
References: 
 >arrayWithContentsOfFile (From: DKJ <email@hidden>)
 >Re: arrayWithContentsOfFile (From: "I. Savant" <email@hidden>)

  • Prev by Date: Re: Appropriate dealloc and finalize actions
  • Next by Date: Validate NSToolbarPrintItem
  • Previous by thread: Re: arrayWithContentsOfFile
  • Next by thread: Re: arrayWithContentsOfFile
  • Index(es):
    • Date
    • Thread