Trait ghostfat::DynamicFile
source · [−]pub trait DynamicFile<const BLOCK_SIZE: usize = 512>: Sync + Send {
fn len(&self) -> usize;
fn read_chunk(&self, chunk_index: usize, buff: &mut [u8]) -> usize;
fn write_chunk(&mut self, chunk_index: usize, data: &[u8]) -> usize;
}
Expand description
ReadWrite trait for generic file objects
Required Methods
sourcefn read_chunk(&self, chunk_index: usize, buff: &mut [u8]) -> usize
fn read_chunk(&self, chunk_index: usize, buff: &mut [u8]) -> usize
Read a chunk of the virtual file, returning the read length
sourcefn write_chunk(&mut self, chunk_index: usize, data: &[u8]) -> usize
fn write_chunk(&mut self, chunk_index: usize, data: &[u8]) -> usize
Write a chunk of the virtual file, returning the write length