6 releases (3 breaking)
0.4.1 | Nov 18, 2022 |
---|---|
0.4.0 |
|
0.3.0 |
|
0.2.2 | Aug 25, 2022 |
0.0.1 | Sep 22, 2020 |
#211 in Filesystem
1,658 downloads per month
Used in media_organizer
14KB
93 lines
permissions
Useful filesystem queries for file permissions:
See functions
.
Windows
support
This library now supports Windows
, however, it hasn't been fully tested.
Please, open an issue if you find any problems.
Examples:
use permissions::*;
fn main() -> std::io::Result<()> {
// Functions accept `AsRef<Path>`
assert!(is_readable("src/")?);
assert!(is_writable("src/")?);
assert!(is_writable("src/lib.rs")?);
assert!(is_executable("/usr/bin/cat")?);
assert!(is_removable("src/lib.rs")?);
assert!(is_creatable("src/file.rs")?);
Ok(())
}
Future
I plan on adding a rwx
permission interface, but I never needed it.
If you need it, create an issue.
Helping/Contributing:
- Use it and give feedback.
- Suggest how to improve.
- Open an issue or PR in the repository.
- Help improve this README or other docs (even little details).
Dependencies
~39KB