How to check if file exists?
How to check if file exists?
- Subject: How to check if file exists?
- From: William Squires <email@hidden>
- Date: Sat, 10 May 2014 14:06:15 -0500
If I have an NSString that contains a filename (and possibly a path, as typed on the command-line), how can I check to see if the specified file actually exists?
i.e.
...
NSString *inFile = [NSString stringWithUTF8String:argv[1]];
...
let's say, and inFile = @"MyFile.txt".
How can I make sure MyFile.txt exists before trying to read it in?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden