UNIXPermissionsExt
A trivial trait bringing missing functions that are not exposed by
std::os::unix::fs::PermissionsExt
to std::fs::Permissions
on UNIX platforms.
Usage
-
Add it to your dependency:
$ cd $YOUR_PROJECT $ cargo add unix_permissions_ext
-
Import this trait and use it just like you are using the standard library!
use metadata; use UNIXPermissionsExt; let metadata = metadata.expect; let permission = metadata.permissions; assert!; println!;
-
To use these functions directly with the
mode_t
type, consider importingraw_fn
module:use *;
Contributing
Contributions of all forms are welcome, feel free to file an issue or make a pull request!
Test before your commit
-
Pass the tests
$ cargo test
-
Format your code
$ cargo fmt