pub struct File { /* private fields */ }Implementations§
Source§impl File
impl File
pub fn flush<D, const SIZE: usize, const N: usize>(
&mut self,
fs: &mut FileSystem<D, SIZE, N>,
) -> ExFatResult<(), D, SIZE>where
D: BlockDevice<SIZE>,
pub fn close<D, const SIZE: usize, const N: usize>(
self,
fs: &mut FileSystem<D, SIZE, N>,
) -> ExFatResult<(), D, SIZE>where
D: BlockDevice<SIZE>,
Sourcepub fn read<D, const SIZE: usize, const N: usize>(
&mut self,
fs: &mut FileSystem<D, SIZE, N>,
buf: &mut [u8],
) -> ExFatResult<Option<usize>, D, SIZE>where
D: BlockDevice<SIZE>,
pub fn read<D, const SIZE: usize, const N: usize>(
&mut self,
fs: &mut FileSystem<D, SIZE, N>,
buf: &mut [u8],
) -> ExFatResult<Option<usize>, D, SIZE>where
D: BlockDevice<SIZE>,
Read bytes from file into buf and return the number of bytes read
Read begins at the cursor position and ends at the lesser of the buf or file length
Sourcepub fn write<D, const SIZE: usize, const N: usize>(
&mut self,
fs: &mut FileSystem<D, SIZE, N>,
buf: &[u8],
) -> ExFatResult<(), D, SIZE>where
D: BlockDevice<SIZE>,
pub fn write<D, const SIZE: usize, const N: usize>(
&mut self,
fs: &mut FileSystem<D, SIZE, N>,
buf: &[u8],
) -> ExFatResult<(), D, SIZE>where
D: BlockDevice<SIZE>,
Writes all bytes from buf into the file from the file cursor position
This function will automatically increase the length of the file if necessary
Sourcepub fn seek<D, const SIZE: usize, const N: usize>(
&mut self,
fs: &mut FileSystem<D, SIZE, N>,
cursor: u64,
) -> ExFatResult<(), D, SIZE>where
D: BlockDevice<SIZE>,
pub fn seek<D, const SIZE: usize, const N: usize>(
&mut self,
fs: &mut FileSystem<D, SIZE, N>,
cursor: u64,
) -> ExFatResult<(), D, SIZE>where
D: BlockDevice<SIZE>,
Seek to an offset, in bytes, in the file
Auto Trait Implementations§
impl Freeze for File
impl RefUnwindSafe for File
impl Send for File
impl Sync for File
impl Unpin for File
impl UnsafeUnpin for File
impl UnwindSafe for File
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