Return to Snippet

Revision: 53633
at November 30, 2011 06:24 by codeRefiner

Initial Code
- (NSString *)documentsDirectory
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documentsDirectory = [paths objectAtIndex:0];
    return documentsDirectory;

Initial URL

Initial Description
Here is a simple function that will return the path to the documents directory so you can store data in it later

Initial Title
Easy function to get the path to the documents directory for data persistance

Initial Tags
data, iphone

Initial Language