iphonensbundle

How can you determine if a file exists within the app bundle?


Sorry, dumb question number 2 today. Is it possible to determine if a file is contained within the App Bundle? I can access files no problem, i.e.,

NSString *pathAndFileName = [[NSBundle mainBundle] pathForResource:fileName ofType:@"plist"];

But can't figure out how to check if the file exists there in the first place.

Regards

Dave


Solution

  • [[NSFileManager defaultManager] fileExistsAtPath:pathAndFileName];