Hi,
I just did a test to change file permissions. It works but it does not pop up the Authentication dialog.
Is there something wrong?
Thank you:
I just did a test to change file permissions. It works but it does not pop up the Authentication dialog.
Is there something wrong?
Thank you:
PHP:
#import "untitled.h"
@implementation untitled
- (IBAction)myAction:(id)sender
{
NSFileManager *fileManager = [NSFileManager defaultManager];
NSString *path = @"/Users/cea/Desktop/test.zip";
// Set permissions to prohibit access from other users
NSDictionary *attr=[NSDictionary dictionaryWithObject:[NSNumber numberWithUnsignedLong:0777U] forKey:NSFilePosixPermissions];
[fileManager setAttributes:attr ofItemAtPath:path error:nil];
NSLog(@"0777 %@", path);
}
@end