I am trying to read file permissions in Cocoa of a file having rw-r--r-- (hence 0644).
The code I am using is the following:
NSUInteger permissions;
permissions=[[fileManager attributesOfItemAtPath:file error:nil] filePosixPermissions];
NSLog(@"Permissions:%lu",permissions);
And the result is 420 when the expected result should be 644.
Do I do a calculation error ? Thanks !