Re: arrayWithContentsOfFile
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