Has someone work with this method of NSFileManager ?
- (BOOL)fileExistsAtPath:(NSString *)path isDirectory:(BOOL *)isDirectory;
How can I use this method to check a folder is existing or not ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use
NSFileManager‘sfileExistsAtPath:isDirectory:method. See Apple’s docs here.or based on your example you could use the following as well
Take a look in the documentation for this method signature:
You need a pointer to a BOOL var as argument, not a BOOL itself. NSFileManager will record if the file is a directory or not in that variable. For example:
Also
Start by understanding Low-Level File Management Programming Topics
1) NSFileManager currentDirectoryPath
3) NSFileManager fileExistsAtPath:isDirectory: