Re: Insuring a path exists
Re: Insuring a path exists
- Subject: Re: Insuring a path exists
- From: Frank Fenn <email@hidden>
- Date: Tue, 8 Jun 2004 21:25:33 -0600
On Jun 8, 2004, at 8:54 PM, Mike O'Connor wrote:
>
NSString* thePath=@"/Library/Application
>
Support/MyApp/MySubfolder/file.typ"
>
>
I want to insure that folders MyApp and MySubfolder exist, so that
>
when I do a writeToFile: using that path, it will succeed.
NSString *appsupp = [NSString stringWithString:@"/Library/Application
Support/App"];
// create application support directory
if(![[NSFileManager defaultManager] fileExistsAtPath:appsupp]) {
// do your stuff if directory doesn't exists
}
Sincerely,
Frank Fenn
--
Bright Light Software -
http://www.brightlightsoftware.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.