Decode Unix file mode bits, change them and apply them to files.
All file type, special and protection bits described in sys/stat.h
are represented.
The Mode
object can represent a file mode partially by the use of a bitmask. Only modified bits will be changed in the target file.
Modifications specific only to directories (search) are handled correctly.
use Path;
use ;
let mode = new.mode.unwrap;
// query bits
assert!;
assert!;
assert!;
assert!;
// print as string
println!; // -rw-rw-r--
assert_eq!;
// apply chmod string
new.set_mode.unwrap;
See module level documentation on docs.rs for more examples.