title: NSBundle pathForResource: returns nil
body: <p>I am attempting to access a .txt file from my supporting files folder in Xcode on iOS using the following piece of code:</p>
  
  <pre><code>NSString* filePath = @"filename.txt";
  
  NSLog(@"File path: %@", filePath);
  
  NSString* fileRoot = [[NSBundle mainBundle] pathForResource:filePath ofType:@"txt"];
  
  NSLog(@"File root: %@", fileRoot);
  </code></pre>
  
  <p>The first NSLog prints just what I expect it to print, but the last NSLog always simply prints</p>
  
  <blockquote>
    <p>File root: (null)</p>
  </blockquote>
  
  <p>Accessing text from the file after (attempting to) reading it into memory also simply gives me a (null) printout.</p>
  
  <p>The solution for this problem is probably right under my nose, I just can't seem to find it. Any help is very appreciated! Thanks in advance.</p>