title: Would like to know whether a directory exist or not inside my Xcode project using objective c?
body: <p>I have created a directory inside my project using this code</p>
  
  <pre><code>NSError * error = nil;
  NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);    
  NSString *documentsDirectory = [paths objectAtIndex:0]; // Get documents folder
  NSString *dataPath = [documentsDirectory stringByAppendingPathComponent:@"/createDirectory1"];
  
  if (![[NSFileManager defaultManager] fileExistsAtPath:dataPath]) 
  {
      [[NSFileManager defaultManager] createDirectoryAtPath:dataPath withIntermediateDirectories:NO attributes:nil error:&amp;error]; //Create folder
      NSLog(@"Create a new Dir");
  }
  else 
  {
      NSLog(@"Dir already exist");
  }
  </code></pre>
  
  <p>now I want to check whether the directory exist or not? how can I get that through objective c code ?</p>