arrayWithContentsOfFile
arrayWithContentsOfFile
- Subject: arrayWithContentsOfFile
- From: DKJ <email@hidden>
- Date: Tue, 13 Oct 2009 11:43:02 -0700
I'm using this code to read an array from a plist:
NSArray *data = [NSArray arrayWithContentsOfFile:[NSHomeDirectory()
stringByAppendingPathComponent:@"/Documents/file.plist"]];
The docs say this method returns nil when the file doesn't exist
(precisely: "Returns nil if the file can’t be opened..."). But the
above code gives me an empty array instead, which caused some confusion.
Surely the docs can't be wrong...
dkj_______________________________________________
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