发布于 4年前
Objective C iPhone SDK:检查文件存在
// check file exists..
BOOL isDirectory = NO;
if ( [[NSFileManager defaultManager] fileExistsAtPath:path isDirectory: &isDirectory ] ) {
// use the file
} else {
// file not there
}
// check file exists..
BOOL isDirectory = NO;
if ( [[NSFileManager defaultManager] fileExistsAtPath:path isDirectory: &isDirectory ] ) {
// use the file
} else {
// file not there
}