pub struct File<'a> { /* private fields */ }
Expand description
File structure.
This structure is used to represent a file in the virtual file system. This is a wrapper around the virtual file system file identifier.
Implementations§
Source§impl<'a> File<'a>
impl<'a> File<'a>
pub async fn open( file_system: &'a VirtualFileSystem<'a>, path: impl AsRef<Path>, flags: Flags, ) -> Result<Self>
pub async fn create_unnamed_pipe( file_system: &'a VirtualFileSystem<'a>, size: usize, status: Status, task: TaskIdentifier, ) -> Result<(Self, Self)>
pub async fn set_position(&self, position: &Position) -> Result<Size>
pub const fn get_file_identifier(&self) -> UniqueFileIdentifier
pub async fn write(&self, buffer: &[u8]) -> Result<Size>
pub async fn write_line(&self, buffer: &[u8]) -> Result<Size>
pub async fn read(&self, buffer: &mut [u8]) -> Result<Size>
pub async fn read_line(&self, buffer: &mut [u8]) -> Result<()>
pub async fn read_to_end(&self, buffer: &mut Vec<u8>) -> Result<Size>
pub async fn get_statistics(&self) -> Result<Statistics_type>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for File<'a>
impl<'a> !RefUnwindSafe for File<'a>
impl<'a> Send for File<'a>
impl<'a> Sync for File<'a>
impl<'a> Unpin for File<'a>
impl<'a> !UnwindSafe for File<'a>
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