extattr
Yet another Extended Attributes library for Rust.
Table of contents
Supported platforms and their documents
Why another crate for EA? Any difference from xattr
?
Extended Attributes syscalls vary across implementations, for example, to set an EA:
// Linux
int ;
// FreeBSD
ssize_t ;
// macOS
int ;
xattr
erases differences in those APIs and provides a consistent, rusty
interface.
// A consistent API that would work on every OS
extattr
aims to provide bindings close to the native one.
// Linux
In most cases, you would like to use xattr
instead of extattr
. However, if
you are on Linux and want to use that extra flags
argument, or you are on macOS
and want to use the arguments position
and options
, then extattr
probably
is a good choice:)
Minimum Supported Rust Version (MSRV)
extattr
is supported on Rust 1.56.1 and higher. The MSRV will not be changed
without bumping the major version.
Contributing
Contributions of all forms are welcome, feel free to file an issue or make a pull request!
Test before your commit
-
Format the code
$ cargo fmt
-
Pass the tests
$ cargo test