objective-c NSFilePosixPermissions to human readable NSString
问题 is there a way to get human readable string (@"drwxr-xr-x" for example) from an NSFilePosixPermissions integer ? 回答1: The file system permissions attribute is simply an unsigned long value. The code below could obviously be made more efficient but it shows [more or less] what needs to be done to get the string you want: // The indices of the items in the permsArray correspond to the POSIX // permissions. Essentially each bit of the POSIX permissions represents // a read, write, or execute bit