[][src]Trait sunrise_libuser::fs::IFileSystemService

pub trait IFileSystemService {
    fn open_disk_partition(
        &mut self,
        manager: WorkQueue<'static>,
        disk_id: DiskId,
        partition_id: PartitionId
    ) -> Result<IFileSystemProxy, Error>;
fn open_disk_storage(
        &mut self,
        manager: WorkQueue<'static>,
        disk_id: DiskId
    ) -> Result<IStorageProxy, Error>;
fn get_disks_count(
        &mut self,
        manager: WorkQueue<'static>
    ) -> Result<u32, Error>;
fn format_disk_partition(
        &mut self,
        manager: WorkQueue<'static>,
        disk_id: DiskId,
        partition_id: PartitionId,
        filesystem_type: FileSystemType
    ) -> Result<(), Error>;
fn initialize_disk(
        &mut self,
        manager: WorkQueue<'static>,
        disk_id: DiskId
    ) -> Result<(), Error>; fn dispatch<'a>(
        &'a mut self,
        manager: WorkQueue<'static>,
        cmdid: u32,
        buf: &'a mut [u8]
    ) -> FutureObj<Result<(), Error>> { ... } }

Entry point of the file system interface.

Allows to interract with various filesytem via IPC.

Required methods

fn open_disk_partition(
    &mut self,
    manager: WorkQueue<'static>,
    disk_id: DiskId,
    partition_id: PartitionId
) -> Result<IFileSystemProxy, Error>

Open a disk partition filesystem. This may fail if no compatible driver is found.

fn open_disk_storage(
    &mut self,
    manager: WorkQueue<'static>,
    disk_id: DiskId
) -> Result<IStorageProxy, Error>

Open a disk as a block device. This may fail if no partition table is found.

fn get_disks_count(&mut self, manager: WorkQueue<'static>) -> Result<u32, Error>

Get the count of disks availaible.

fn format_disk_partition(
    &mut self,
    manager: WorkQueue<'static>,
    disk_id: DiskId,
    partition_id: PartitionId,
    filesystem_type: FileSystemType
) -> Result<(), Error>

Format a disk partition to the given filesystem type.

fn initialize_disk(
    &mut self,
    manager: WorkQueue<'static>,
    disk_id: DiskId
) -> Result<(), Error>

Initialize a disk partition table

Loading content...

Provided methods

fn dispatch<'a>(
    &'a mut self,
    manager: WorkQueue<'static>,
    cmdid: u32,
    buf: &'a mut [u8]
) -> FutureObj<Result<(), Error>>

Handle an incoming IPC request.

Loading content...

Implementors

Loading content...