Struct bip_disk::fs::NativeFileSystem
[−]
[src]
pub struct NativeFileSystem { /* fields omitted */ }
File system that maps to the OS file system.
Methods
impl NativeFileSystem
[src]
fn with_directory<P>(default: P) -> NativeFileSystem where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
Initialize a new NativeFileSystem
with the default directory set.
Trait Implementations
impl FileSystem for NativeFileSystem
[src]
type File = NativeFile
Some file object.
fn open_file<P>(&self, path: P) -> Result<Self::File> where
P: AsRef<Path> + Send + 'static,
[src]
P: AsRef<Path> + Send + 'static,
Open a file, create it if it does not exist. Read more
fn sync_file<P>(&self, _path: P) -> Result<()> where
P: AsRef<Path> + Send + 'static,
[src]
P: AsRef<Path> + Send + 'static,
Sync the file.
fn file_size(&self, file: &NativeFile) -> Result<u64>
[src]
Get the size of the file in bytes.
fn read_file(
&self,
file: &mut NativeFile,
offset: u64,
buffer: &mut [u8]
) -> Result<usize>
[src]
&self,
file: &mut NativeFile,
offset: u64,
buffer: &mut [u8]
) -> Result<usize>
Read the contents of the file at the given offset. Read more
fn write_file(
&self,
file: &mut NativeFile,
offset: u64,
buffer: &[u8]
) -> Result<usize>
[src]
&self,
file: &mut NativeFile,
offset: u64,
buffer: &[u8]
) -> Result<usize>
Write the contents of the file at the given offset. Read more