Permcon
A simple library/CLI to parse Linux file permissions and convert them between symbolic and octal notation. This package is a Rust port of my Node.js CLI permcon.
Installation
Library Usages
use ;
use get_filetype_from_char;
let perm = try_from.unwrap;
assert_eq!;
CLI usages
# -rwxr-xr-T
# 1775
# Note: a `--` is required if the permission string starts with an `-`.
# 1775
# file type : Regular File
# symbolic : -rwxrwxr-t
# octal : 1775
# ------------------------
# user (rwx, 7): read, write, execute
# group(rwx, 7): read, write, execute
# other(r-t, 5): read, _ , (execute, StickyBit)
# ------------------------
# special permissions: StickyBit
# file type : Unknown
# symbolic : -rwxr-xr-T
# octal : 1754
# ------------------------
# user (rwx, 7): read, write, execute
# group(r-x, 5): read, _ , execute
# other(r-T, 4): read, _ , (_, StickyBit)
# ------------------------
# special permissions: StickyBit
If you find a bug or want to improve something then please feel free to open an issue or create a pull request :).