title: check if file exist
body: <p>i want to check a folder.if i found "test.jpeg" in "path" if it 's true i do nothing but if it false i have to download this picture like that</p>
  
  <pre><code>UIImage *image = [[UIImage alloc] initWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:[dico objectForKey:@"photo"]]]];
  nomPhoto = [[cell.pseudo text]stringByReplacingOccurrencesOfString:@"\n" withString:@""];;
  NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES);
  NSString *document = [paths objectAtIndex:0];
  filename = [NSString stringWithFormat:@"%@/%@.jpeg",document,nomPhoto];
  
  NSData *data2 = [NSData dataWithData:UIImageJPEGRepresentation(image, 0.1f)];//1.0f = 100% quality
  
  [data2 writeToFile:filename atomically:YES];
  </code></pre>
  
  <p>EDIT: i try this but don't work. the path is good</p>
  
  <pre><code>NSString* documentsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
  NSString* pict =  [documentsPath stringByAppendingPathComponent :@"portos"]; 
  
  
  BOOL fileExists = [[NSFileManager defaultManager] fileExistsAtPath:pict];
  
  if (fileExists)
  {
      NSLog(@"file ok");
  }else {
      NSLog(@"file ko");
  }
  </code></pre>
  
  <p>thx</p>