1
- # unix \_ mode Rust library
1
+ # unix_mode: Decode, interpret, and display Unix file mode bits
2
2
3
3
[ ![ crates.io] ( https://img.shields.io/crates/v/unix_mode.svg )] ( https://crates.io/crates/unix_mode )
4
4
[ ![ docs.rs] ( https://docs.rs/unix_mode/badge.svg )] ( https://docs.rs/unix_mode )
5
5
[ ![ Tests] ( https://github.com/sourcefrog/unix_mode/workflows/rust/badge.svg )] ( https://github.com/sourcefrog/unix_mode/actions?query=workflow%3Arust )
6
6
7
- This library provides functions to decode and print Unix mode bits /
8
- permissions, even on non-Unix platforms.
7
+ ` unix_mode ` provides functions to decode, interpret, and display Unix mode bits
8
+ and permissions, even on non-Unix platforms.
9
9
10
10
On Unix, decoding is supported by ` std::os::unix::fs ` in the standard library,
11
- but this crate adds a function to render them in the format used by ` ls -l ` ,
12
- and to understand the file type and permissions.
11
+ but this crate adds a function to render them in the format used by ` ls -l ` , and
12
+ to understand the file type and permissions.
13
13
14
14
assert_eq!(unix_mode::to_string(0o0040755), "drwxr-xr-x");
15
15
assert_eq!(unix_mode::to_string(0o0100640), "-rw-r-----");
16
-
16
+
17
17
assert_eq!(unix_mode::is_symlink(0o0040755), false);
18
18
19
19
For API documentation see < https://docs.rs/unix_mode > .
@@ -26,8 +26,7 @@ Apache-2.0.
26
26
27
27
Patches are very welcome.
28
28
29
- Please read the
30
- [ contribution guidelines] ( CONTRIBUTING.md ) and
29
+ Please read the [ contribution guidelines] ( CONTRIBUTING.md ) and
31
30
[ code of conduct] ( CODE_OF_CONDUCT.md ) .
32
31
33
32
## Disclaimer
0 commit comments