Skip to content

Instantly share code, notes, and snippets.

@nishabe
Last active August 12, 2018 18:23
Show Gist options
  • Save nishabe/71bacab21d6a07df499b664c3d2d7c77 to your computer and use it in GitHub Desktop.
Save nishabe/71bacab21d6a07df499b664c3d2d7c77 to your computer and use it in GitHub Desktop.
OBJC: Get path of a file which is in documents directory
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *filePath = [documentsDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.log",stringFromDate]];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment