「IOS」Documentsのパスの取得方法

1.Documentsのパスの取得
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *docDir = [paths objectAtIndex:0];

2.Cachesパスの取得
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
NSString *cachesDir = [paths objectAtIndex:0];

3.tmpディレクトリの取得
NSString *tmpDir = NSTemporaryDirectory();

IOS

Posted by arkgame