pub trait Path: PurePath {
// Required methods
fn exists(&self) -> bool;
fn is_dir(&self) -> bool;
fn is_file(&self) -> bool;
fn read_dir(&self) -> Vec<Self>;
fn read_file(&self) -> Vec<u8> ⓘ;
fn write_file(&self, data: &[u8]);
}Expand description
A path trait.
Required Methods§
Sourcefn write_file(&self, data: &[u8])
fn write_file(&self, data: &[u8])
Writes the file.
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.