Created
March 28, 2014 10:35
-
-
Save ethanbing/9829815 to your computer and use it in GitHub Desktop.
获取程序的Documents路径
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Returns the path to the application's documents directory. | |
*/ | |
- (NSString *)applicationDocumentsDirectory { | |
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); | |
NSString *basePath = ([paths count] > 0) ? [paths objectAtIndex:0] : nil; | |
return basePath; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment