을 사용하여 현재 디렉토리를 변경할 수 없습니다 여기에 내 코드은 NSFileManager를
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSFileManager *filemgr = [NSFileManager defaultManager];
if([filemgr changeCurrentDirectoryPath:@"/Users/me/"] == NO) {
NSLog(@"Cannot change current directory");
}
[pool drain];
return 0;
}
내가 말할 응용 프로그램을 실행하면 "현재 디렉토리를 변경할 수 없습니다"입니다. 아이폰 앱이 아닙니다. 그것은 단순한 콘솔 앱입니다. 여기에 무슨 문제가 있습니까?
는
파일 경로가 존재합니까? – Ilanchezhian