Retrieve the path to the Documents directoru:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES); NSString *documentsDirectory = [paths objectAtIndex:0];
why the index is 0? Only one directory meets the criteria.
Getting the tmp Directory.
NSString *tmp = NSTemporaryDirectory(); NSString *tmpFile = [tmp stringByApendingPathComponent:@"tempFile.txt"];