pub struct FatFs { /* private fields */ }Implementations§
Source§impl FatFs
impl FatFs
Sourcepub fn new(disk: Box<dyn Disk>, scope: ExecutionScope) -> Result<Self, Error>
pub fn new(disk: Box<dyn Disk>, scope: ExecutionScope) -> Result<Self, Error>
Create a new FatFs using the given ReadWriteSeek as the disk.
pub fn filesystem(&self) -> &FatFilesystem
pub fn is_present(&self) -> bool
Sourcepub fn get_root(&self) -> Result<Arc<FatDirectory>, Status>
pub fn get_root(&self) -> Result<Arc<FatDirectory>, Status>
Get the root directory of this filesystem. The caller must call close() on the returned entry when it’s finished with it.
pub fn handle_admin( &self, scope: &ExecutionScope, req: AdminRequest, ) -> Option<AdminShutdownResponder>
Sourcepub fn shut_down(self) -> Result<(), Status>
pub fn shut_down(self) -> Result<(), Status>
Shut down the filesystem.
§Preconditions
This method requires exclusive ownership of the underlying FatFilesystem (held via Rc).
The caller must ensure that all other references (e.g., outstanding VFS connections,
active file/directory handles) have been dropped before calling this.
If there are outstanding references, Rc::into_inner will fail, and this method
will return Err(Status::BAD_STATE) without unmounting the filesystem, to prevent
potential Use-After-Free (UAF) bugs.
Typically, one should shut down the VFS scope and wait for all connections to close
(e.g., via scope.wait().await) before invoking this.
Auto Trait Implementations§
impl Freeze for FatFs
impl !RefUnwindSafe for FatFs
impl Send for FatFs
impl Sync for FatFs
impl Unpin for FatFs
impl UnsafeUnpin for FatFs
impl !UnwindSafe for FatFs
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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more