Check whether a file exists in Objective C
“fileExistsAtPath” is used to check whether a file exists or not at a specified path.
“fileExistsAtPath” is used to check whether a file exists or not at a specified path.
Basic file operations Assumes the existence of a file called “testfile” in the current working directory #import #import #import #import #import int main (int argc, char *argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSString *fName = @”testfile”; NSFileManager *fm; NSDictionary *attr; // Need to create an instance of the file manager fm =… Read More »