Re: NSFileManager Help
Re: NSFileManager Help
- Subject: Re: NSFileManager Help
- From: Jason Coco <email@hidden>
- Date: Wed, 27 Aug 2008 20:58:52 -0400
On Aug 27, 2008, at 20:43 , J. Todd Slack wrote:
Hi All,
It simply does not create the directory. This is code that I had in
another project that worked.
What am I missing?
Does the parent directory exist already (~/Application Support/Ring-
Maker)? If not, this
call will fail. However, since you're using 10.5 you should use this
method:
-(BOOL)createDirectoryAtPath:(NSString*)path
withIntermediateDirectories:(BOOL)createIntermediates attributes:
(NSDictionary*)attributes error:(NSError**)error;
Here you can specify YES to create the top levels even if it doesn't
exist and if it does fail, you can interrogate the NSError object to
see why.
HTH, Jason
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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