building a file path
building a file path
- Subject: building a file path
- From: mathew <email@hidden>
- Date: Sat, 24 Jan 2009 17:00:23 +1100
hello,
i'm writing some code that saves a file on the iphone,
there's no user intervention / file dialog involved.
so once i've found the documents directory
<code>
NSArray *paths =
NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
NSUserDomainMask, YES);
if ([paths count] < 1)
{
//failed
return;
}
NSString* path = [paths objectAtIndex:0];
</code>
should I just manually build a file path string by adding "/myfolder/
myfile.xml' to 'path'
or is there a correct way to do it that doesn't involve hard coding
the slashes into the filepath?
cheers
thanks for your help
mathew
_______________________________________________
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