How to use Erlang file:read_file_info permissions/mode info?
问题 The Erlang docs for file:read_file_info/1 state "file permissions [are] the sum" and "other bits...may be set", not instilling confidence. And, Google has not been my friend here. I'm looking to take the mode returned by file:read_file_info/1 , e.g. 33188 , on a Linux machine and convert it into something more human readable and/or recognizable, like rw-r--r-- or 644 . Any tips, links, or directions greatly appreciated. 回答1: The short way: io_lib:format("~.8B", [Mode]). ... or: io_lib:format(