daily pastebin goal
60%
SHARE
TWEET

Untitled

a guest Jan 17th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. - (NSString*)checkDirectory:(NSString*)path {
  2. NSError *error = nil;
  3. BOOL isDir = YES;
  4. NSString *string = [NSHomeDirectory() stringByAppendingPathComponent:[@"/Documents" stringByAppendingFormat:@"/%@/",path]];
  5. if(![[NSFileManager defaultManager]fileExistsAtPath:string isDirectory:&isDir]){
  6.     if (![[NSFileManager defaultManager]createDirectoryAtPath:string withIntermediateDirectories:NO attributes:nil error:&error]) {
  7.         NSLog(@"Create directory error %@",error);
  8.     }
  9. }
  10. return string;
  11. }
  12.    
  13. /Reports/year2012/38week/
  14.    
  15. withIntermediateDirectories:YES
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top