pub struct RegularFile<FS: FileSystem> {
file: RegularFile,
size: AtomicUsize,
cache: PageCache<FS>,
}Expand description
An overlay on the RegularFile.
Fields§
§file: RegularFile§size: AtomicUsize§cache: PageCache<FS>Trait Implementations§
Source§impl<FS: FileSystem> RegularFile for RegularFile<FS>
impl<FS: FileSystem> RegularFile for RegularFile<FS>
Source§fn ino(&self) -> InodeNumber
fn ino(&self) -> InodeNumber
Returns the inode number of the file.
Source§fn read(
&self,
fba: FileBlockNumber,
buf: &mut [u8; 4096],
) -> Result<bool, KernelError>
fn read( &self, fba: FileBlockNumber, buf: &mut [u8; 4096], ) -> Result<bool, KernelError>
Reads data from the file into the provided buffer. Read more
Source§fn write(
&self,
fba: FileBlockNumber,
buf: &[u8; 4096],
min_size: usize,
) -> Result<(), KernelError>
fn write( &self, fba: FileBlockNumber, buf: &[u8; 4096], min_size: usize, ) -> Result<(), KernelError>
Writes a 4096-byte page of data into the specified file block. Read more
Source§fn writeback(&self) -> Result<(), KernelError>
fn writeback(&self) -> Result<(), KernelError>
Write back the file to disk.
Source§fn mmap(&self, fba: FileBlockNumber) -> Result<Page, KernelError>
fn mmap(&self, fba: FileBlockNumber) -> Result<Page, KernelError>
Maps a file block into memory. Read more