title: Array of NSStrings from filenames within a folder?
body: <p>I'm trying to create an array of NSStrings of the contents of a folder that I've dragged into my project... but when I count the items in the array afterwards, it's always comes back with 0;</p>
  
  <p>So, my folder in my project looks like this</p>
  
  <pre><code>-Cards
    -Colors
       Blue.png
       Green.png
       Orange.png
       Yellow.png
       Purple.png
       Black.png
  </code></pre>
  
  <p>And my code which tries to get this list of files (the color pngs) is</p>
  
  <pre><code>NSError *error = nil;
  NSString *pathString = [[NSString alloc] init];
  pathString = [[NSString alloc] initWithString:@"/Cards/Colors/"];
  NSArray *fileList = [[NSArray alloc] init];
  fileList = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:pathString error: &amp;error];
  [pathString release];
  NSLog(@"%@", error);
  // this is always 0
  NSLog(@"file list has %i items", [fileList count]);
  </code></pre>
  
  <p>The NSError I get is</p>
  
  <pre><code>Error Domain=NSCocoaErrorDomain Code=260 "The operation couldn’t be completed. (Cocoa error 260.)" UserInfo=0x596db00 {NSUserStringVariant=(
      Folder
  ), NSFilePath=/Cards/Color/, NSUnderlyingError=0x5925ef0 "The operation couldn’t be completed. No such file or directory"}
  </code></pre>
  
  <p>Any ideads where I am going wrong?</p>