[][src]Trait sunrise_fs::interface::driver::FileSystemDriver

pub trait FileSystemDriver: Send {
    fn construct(
        &self,
        storage: Box<dyn StorageDevice<Error = Error> + Send>
    ) -> LibUserResult<Box<dyn FileSystemOperations>>;
fn probe(
        &self,
        storage: &mut (dyn StorageDevice<Error = Error> + Send)
    ) -> Option<FileSystemType>;
fn is_supported(&self, filesytem_type: FileSystemType) -> bool;
fn format(
        &self,
        storage: Box<dyn StorageDevice<Error = Error> + Send>,
        filesytem_type: FileSystemType
    ) -> LibUserResult<()>; }

Driver instance.

Required methods

fn construct(
    &self,
    storage: Box<dyn StorageDevice<Error = Error> + Send>
) -> LibUserResult<Box<dyn FileSystemOperations>>

Construct a new filesystem instance if the driver identifies the storage as a valid one.

fn probe(
    &self,
    storage: &mut (dyn StorageDevice<Error = Error> + Send)
) -> Option<FileSystemType>

Proble the detected filesystem on the given partition.

fn is_supported(&self, filesytem_type: FileSystemType) -> bool

Check if this driver support the given filesystem type.

fn format(
    &self,
    storage: Box<dyn StorageDevice<Error = Error> + Send>,
    filesytem_type: FileSystemType
) -> LibUserResult<()>

Format a given storage to hold a filesystem supported by this driver.

Loading content...

Implementors

impl FileSystemDriver for FATDriver[src]

Loading content...