permissions

Permissions crate

Crates.io License Docs.rs

Useful filesystem queries for file permissions: - is_executable - is_readable - is_writable - is_removable

See functions.

No Windows support

This library compiles for Unix systems, PRs for fixing it for Windows are welcome.

See this issue.

Examples:

```rust use permissions::*;

fn main() -> std::io::Result<()> { println!("{:?}", isreadable("src/lib.rs")?); println!("{:?}", iswritable("src/lib.rs")?); println!("{:?}", isexecutable("src/lib.rs")?); println!("{:?}", isremovable("src/lib.rs")?);

Ok(()) } ```

More about it

For the 0.3 version I plan on adding an nicer rwx bitmask interface, if you're interested, open an issue and I'll consider completing it sooner.

I haven't finished 0.3 because I didn't needed it, I just needed this crate to implement what's in 0.1 for other project of mine, that's why I'm waiting for someone to ask me to implement it before I do so.

I also want to ask what are the needs of other people for these features in 0.3.

Part of the code for rwx and (Owner | Group | Other) permissions bitflags are already available at the project's repository.

Helping/Contributing:

It's easy to contribute to this crate, here are some options: