title: How to get the list of directores in NSDocumentDirectory?
body: <p>I have created some directories in NSDocumentDirectory as </p>
  
  <pre><code>if (![tbxCreateFolder.text isEqualToString:@""]) {
  NSArray  *arrPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
  NSString *documentsDirectoryStr = [arrPaths objectAtIndex:0]; // Get documents folder
  NSString *dataPath = [documentsDirectoryStr stringByAppendingPathComponent:[NSString stringWithFormat:@"/%@",tbxCreateFolder.text]];
  
  if (![[NSFileManager defaultManager] fileExistsAtPath:dataPath]){
  
      NSError* error;
      if([[NSFileManager defaultManager] createDirectoryAtPath:dataPath withIntermediateDirectories:NO attributes:nil error:&amp;error]){
  
          NSLog(@"success");
          //Perfrom DB Insertation
      }
      else
      {
          NSLog(@"[%@] ERROR: attempting to write create MyFolder directory", [self class]);
          NSAssert( FALSE, @"Failed to create directory maybe out of disk space?");
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Now i want to get the list of directories that i have created in document folder but response is </p>
  
  <pre><code>NSArray *arrPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
  NSString *basePathString = ([arrPaths count] &gt; 0) ? [arrPaths objectAtIndex:0] : nil;
  NSLog(@"dirContents %@",basePathString);
  </code></pre>
  
  <p>Response is:</p>
  
  <pre><code>/Users/amir/Library/Application Support/iPhone Simulator/6.1/Applications/7003E8D5-CCBB-4E54-896B-F4BD2F4D2CB1/Documents
  </code></pre>