JanetDocsI'm feeling luckyGithub sign in

os/perm-string



    cfunction

    (os/perm-string int)
    
    Convert a Unix octal permission value from a permission integer as
    returned by os/stat to a human readable string, that follows the
    formatting of unix tools like ls. Returns the string as a 9 character
    string of r, w, x and - characters. Does not include the
    file/directory/symlink character as rendered by `ls`.


1 exampleSign in to add an example
Loading...
(os/perm-string 420)    # => "rw-r--r--"
(os/perm-string 8r644)  # => "rw-r--r--"
(os/perm-string 493)    # => "rwxr-xr-x"
(os/perm-string 8r755)  # => "rwxr-xr-x"
cellularmitosis