Trait xattr::FileExt
[−]
[src]
pub trait FileExt: AsRawFd { fn get_xattr<N>(&self, name: N) -> Result<Vec<u8>>
where
N: AsRef<OsStr>, { ... } fn set_xattr<N>(&self, name: N, value: &[u8]) -> Result<()>
where
N: AsRef<OsStr>, { ... } fn remove_xattr<N>(&self, name: N) -> Result<()>
where
N: AsRef<OsStr>, { ... } fn list_xattr(&self) -> Result<XAttrs> { ... } }
Provided Methods
fn get_xattr<N>(&self, name: N) -> Result<Vec<u8>> where
N: AsRef<OsStr>,
N: AsRef<OsStr>,
Get an extended attribute for the specified file.
fn set_xattr<N>(&self, name: N, value: &[u8]) -> Result<()> where
N: AsRef<OsStr>,
N: AsRef<OsStr>,
Set an extended attribute on the specified file.
fn remove_xattr<N>(&self, name: N) -> Result<()> where
N: AsRef<OsStr>,
N: AsRef<OsStr>,
Remove an extended attribute from the specified file.
fn list_xattr(&self) -> Result<XAttrs>
List extended attributes attached to the specified file.
Note: this may not list all attributes. Speficially, it definitely won't list any trusted attributes unless you are root and it may not list system attributes.
Implementors
impl FileExt for File