Tag Archives: directory

How to access special directory on the iphone device

Use NSSearchPathForDirectoriesInDomains(). First argument “NSDocumentDirecotry” is the key to specify special directory, in this case Document directory under the application. The method returns absolute path expression.

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
                               NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSLog(@"NSDocumentDirectory is %@", documentsDirectory);
Leave a comment Continue Reading →