- (void)chmodOpen { NSString *path = @"/hardcoded_path_of_directory"; NSFileManager *manager = [[[NSFileManager alloc] init] autorelease]; BOOL isDir; if ([manager fileExistsAtPath:path isDirectory:&isDir]&&isDir) { NSDictionary *attrib = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithUnsignedLong:511], NSFilePosixPermissions, nil ]; NSError *error = nil; [manager setAttributes:attrib ofItemAtPath:path error:&error]; } //Basically chmod 777 on directory; }
int perm = 0755;
NSLog(@"%d %o", perm, perm);
'개발개발 > Mac, iOS' 카테고리의 다른 글
LibActivator add Event (Not Listners) (0) | 2011.08.08 |
---|---|
substrate Extension 과 LibActivator 연동하기 (0) | 2011.05.01 |
Xcode - Device Log 보기 (0) | 2011.02.23 |
BundleIdentifier로 앱 정보 구하기 (4) | 2011.02.23 |
앱 설치 여부 구하기 (0) | 2011.02.22 |