UnixFileSystem

Trait UnixFileSystem 

Source
pub trait UnixFileSystem {
    // Required methods
    fn mode<P: AsRef<Path>>(&self, path: P) -> Result<u32>;
    fn set_mode<P: AsRef<Path>>(&self, path: P, mode: u32) -> Result<()>;
}

Required Methods§

Source

fn mode<P: AsRef<Path>>(&self, path: P) -> Result<u32>

Returns the current mode bits of path.

§Errors
  • path does not exist.
  • Current user has insufficient permissions.
Source

fn set_mode<P: AsRef<Path>>(&self, path: P, mode: u32) -> Result<()>

Sets the mode bits of path.

§Errors
  • path does not exist.
  • Current user has insufficient permissions.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl UnixFileSystem for FakeFileSystem

Available on Unix only.
Source§

impl UnixFileSystem for OsFileSystem

Available on Unix only.