title: image cache iphone
body: <p>this is a part of my code. I'm using a asyncImageView .Everything work good. But now i want to save in the iphone all images in a path. I know i have to use NSFileManager but where?
  EDIT: now i try with my code but nothing save when i compile on my iphone</p>
  
  <pre><code>// Configure the cell.
  
  NSDictionary *dico = [self.pseudoOnline objectAtIndex:indexPath.row];
  cell.pseudo.text = [dico objectForKey:@"pseudo"];
  cell.sexe.text    = [dico objectForKey:@"sexe"];
  cell.age.text     = [dico objectForKey:@"age"];
  
  
  UIImage *image = [[UIImage alloc] initWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:[dico objectForKey:@"photo"]]]];  
  
  
  NSString *deskTopDir = @"/Users/***/Desktop/imagesOnline";
  
  
  
  NSString *nomPhoto = [[cell.pseudo text]stringByReplacingOccurrencesOfString:@"\n" withString:@""];;
  
  NSLog(@"pseudo%@",nomPhoto);
  
  
  
  NSString *jpegFilePath = [NSString stringWithFormat:@"%@/%@.jpeg",deskTopDir,nomPhoto];
  
  NSData *data2 = [NSData dataWithData:UIImageJPEGRepresentation(image, 0.5f)]; quality
  [data2 writeToFile:jpegFilePath atomically:YES];
  
  NSLog(@"image %@",jpegFilePath);
  
  [image release];
  
  
  
  CGRect frame;
  
  frame.size.width=45; frame.size.height=43;
  
  frame.origin.x=-5; frame.origin.y=0;
  
  asyncImageView *asyncImage = [[[asyncImageView alloc] initWithFrame:frame] autorelease];
  
  asyncImage.tag =999;
  
  
  [asyncImage loadImageFromURL:[NSURL URLWithString:[dico objectForKey:@"photo"]]];
  [cell.contentView addSubview:asyncImage];
  
  
  
  return cell;
  </code></pre>
  
  <p>so now it works i can download all the pictures. But now i want to load them</p>