Bool isDir; // path is an NSString * // &isDir means the address of the isDir variable if([filemanager fileExistsAtPath:path isDirectory:&isDir] && !isDir){ // do something - we have a valid file that is not a directory }
Bool *isDir; if([filemanager fileExistsAtPath:path isDirectory:isDir] && !isDir){ // !! THIS WILL NOT WORK !! }