pub struct NativeFileSystem { /* private fields */ }
Expand description
File system that maps to the OS file system.
Implementations§
Source§impl NativeFileSystem
impl NativeFileSystem
Sourcepub fn with_directory<P>(default: P) -> NativeFileSystem
pub fn with_directory<P>(default: P) -> NativeFileSystem
Initialize a new NativeFileSystem
with the default directory set.
Trait Implementations§
Source§impl FileSystem for NativeFileSystem
impl FileSystem for NativeFileSystem
Source§type File = NativeFile
type File = NativeFile
Some file object.
Source§fn open_file<P>(&self, path: P) -> Result<Self::File>
fn open_file<P>(&self, path: P) -> Result<Self::File>
Open a file, create it if it does not exist. Read more
Source§fn read_file(
&self,
file: &mut NativeFile,
offset: u64,
buffer: &mut [u8],
) -> Result<usize>
fn read_file( &self, file: &mut NativeFile, offset: u64, buffer: &mut [u8], ) -> Result<usize>
Read the contents of the file at the given offset. Read more
Source§fn write_file(
&self,
file: &mut NativeFile,
offset: u64,
buffer: &[u8],
) -> Result<usize>
fn write_file( &self, file: &mut NativeFile, offset: u64, buffer: &[u8], ) -> Result<usize>
Write the contents of the file at the given offset. Read more
Auto Trait Implementations§
impl Freeze for NativeFileSystem
impl RefUnwindSafe for NativeFileSystem
impl Send for NativeFileSystem
impl Sync for NativeFileSystem
impl Unpin for NativeFileSystem
impl UnwindSafe for NativeFileSystem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more