title: NSFileManager to search image file in folder
body: <p>I am using NSFileManager to search "index.png" file. if file doesnt exist then I am trying to display default image. I am using the code below but Its not working. Am i doing something incorrect here?</p>
  
  <pre><code>NSString *path;
  NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
  NSString path1 = [[paths objectAtIndex:0] stringByAppendingPathComponent:literature.localURL.path];
  path = [path1 stringByAppendingPathComponent:@"index.PNG"];
  
      if ([[NSFileManager defaultManager] fileExistsAtPath:path]){
          cell.preview = [UIImage imageWithContentsOfFile:path1];
      }
      else {
          cell.preview = [UIImage imageNamed:@"Default-HTML5.PNG"];
      }
  }
  </code></pre>