0
我想弄清楚如何檢查項目中是否存在文件夾。問題是,它找不到「MyFolder」,我認爲這是因爲它不是在捆綁內查看,而是在手機的根目錄。如果我打印當前路徑,則返回「/」檢查包/項目中是否存在文件/文件夾
BOOL isDir;
BOOL exists = [fileManager fileExistsAtPath:@"MyFolder/" isDirectory:&isDir];
if (exists) {
NSLog(@"exist");
/* file exists */
if (isDir) {
/* file is a directory */
NSLog(@"is dir");
}
}
我該如何解決這個問題?