Possible Duplicate:
What's a quick way to test to see a file exists?
I am new to iPhone development. I save an image in the “Documents” folder. Below shows the code which is using for that
NSString *fullPath=[[NSString stringWithFormat:@"Documents/%@",limgName] retain];
NSString *mpngPath = [NSHomeDirectory() stringByAppendingPathComponent:fullPath];
NSLog(@"saving path %@",mpngPath);
[myImgdata writeToFile:mpngPath atomically:YES];
My aim is the next time i want to check this image exists or not in the document folder. How to check this path exists or not.
You will have to get
mpngPaththe same way and later useNSFileManagerto check if the file exists or not.