Skip to content

Instantly share code, notes, and snippets.

@yajamon
Created August 3, 2015 13:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yajamon/79ba97d73d940161fac6 to your computer and use it in GitHub Desktop.
Save yajamon/79ba97d73d940161fac6 to your computer and use it in GitHub Desktop.
// 保存ディレクトリの確認・生成
BOOL *isDir = NULL;
if (![[NSFileManager defaultManager] fileExistsAtPath:dirPath isDirectory:isDir]) {
NSError * error;
[[NSFileManager defaultManager] createDirectoryAtPath:dirPath withIntermediateDirectories:NO attributes:nil error:&error];
NSAssert(!error, @"file write error");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment