title: How can I return all the name of the files in Resources folder in ios?
body: <p>I want to retrieve in an array of the name of the files in Resources folder that have the <code>.html</code> extension. I have done this:</p>
  
  <pre><code>NSString *documentsDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Resources"];
  NSError *error = nil;
  NSArray *documentArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:documentsDirectory error:&amp;error];
  for (int i=0; i &lt; [documentArray count] - 1; i++) {
      NSLog(@"value %@", [documentArray objectAtIndex:i]);
  }
  </code></pre>
  
  <p>But the for loop displays continously null. Anyone knows how can I get this task right? thank you</p>