[][src]Trait sunrise_libuser::fs::IFileSystem

pub trait IFileSystem {
    fn create_file(
        &mut self,
        manager: WorkQueue<'static>,
        mode: u32,
        size: u64,
        path: &FileSystemPath
    ) -> Result<(), Error>;
fn delete_file(
        &mut self,
        manager: WorkQueue<'static>,
        path: &FileSystemPath
    ) -> Result<(), Error>;
fn create_directory(
        &mut self,
        manager: WorkQueue<'static>,
        path: &FileSystemPath
    ) -> Result<(), Error>;
fn delete_directory(
        &mut self,
        manager: WorkQueue<'static>,
        path: &FileSystemPath
    ) -> Result<(), Error>;
fn rename_file(
        &mut self,
        manager: WorkQueue<'static>,
        old_path: &FileSystemPath,
        new_path: &FileSystemPath
    ) -> Result<(), Error>;
fn rename_directory(
        &mut self,
        manager: WorkQueue<'static>,
        old_path: &FileSystemPath,
        new_path: &FileSystemPath
    ) -> Result<(), Error>;
fn get_entry_type(
        &mut self,
        manager: WorkQueue<'static>,
        path: &FileSystemPath
    ) -> Result<DirectoryEntryType, Error>;
fn open_file(
        &mut self,
        manager: WorkQueue<'static>,
        mode: u32,
        path: &FileSystemPath
    ) -> Result<IFileProxy, Error>;
fn open_file_as_ipipe(
        &mut self,
        manager: WorkQueue<'static>,
        mode: u32,
        path: &FileSystemPath
    ) -> Result<IPipeProxy, Error>;
fn open_directory(
        &mut self,
        manager: WorkQueue<'static>,
        filter_flags: u32,
        path: &FileSystemPath
    ) -> Result<IDirectoryProxy, Error>;
fn get_free_space_size(
        &mut self,
        manager: WorkQueue<'static>,
        path: &FileSystemPath
    ) -> Result<u64, Error>;
fn get_total_space_size(
        &mut self,
        manager: WorkQueue<'static>,
        path: &FileSystemPath
    ) -> Result<u64, Error>;
fn get_file_timestamp_raw(
        &mut self,
        manager: WorkQueue<'static>,
        path: &FileSystemPath
    ) -> Result<FileTimeStampRaw, Error>;
fn get_filesystem_type(
        &mut self,
        manager: WorkQueue<'static>
    ) -> Result<FileSystemType, Error>; fn dispatch<'a>(
        &'a mut self,
        manager: WorkQueue<'static>,
        cmdid: u32,
        buf: &'a mut [u8]
    ) -> FutureObj<Result<(), Error>> { ... } }

Represent a filesystem.

Required methods

fn create_file(
    &mut self,
    manager: WorkQueue<'static>,
    mode: u32,
    size: u64,
    path: &FileSystemPath
) -> Result<(), Error>

Create a file with a given size at the specified path.

fn delete_file(
    &mut self,
    manager: WorkQueue<'static>,
    path: &FileSystemPath
) -> Result<(), Error>

Delete a file at the specified path.

fn create_directory(
    &mut self,
    manager: WorkQueue<'static>,
    path: &FileSystemPath
) -> Result<(), Error>

Create a directory at the specified path.

fn delete_directory(
    &mut self,
    manager: WorkQueue<'static>,
    path: &FileSystemPath
) -> Result<(), Error>

Delete a directory at the specified path.

fn rename_file(
    &mut self,
    manager: WorkQueue<'static>,
    old_path: &FileSystemPath,
    new_path: &FileSystemPath
) -> Result<(), Error>

Rename a file at old_path into new_path.

fn rename_directory(
    &mut self,
    manager: WorkQueue<'static>,
    old_path: &FileSystemPath,
    new_path: &FileSystemPath
) -> Result<(), Error>

Rename a directory at old_path into new_path

fn get_entry_type(
    &mut self,
    manager: WorkQueue<'static>,
    path: &FileSystemPath
) -> Result<DirectoryEntryType, Error>

Get the informations about an entry on the filesystem.

fn open_file(
    &mut self,
    manager: WorkQueue<'static>,
    mode: u32,
    path: &FileSystemPath
) -> Result<IFileProxy, Error>

Open a file at the specified path with the given mode flags.

mode controls how the file is opened, based on which bits are set: When bit 0 is set, the file is Readable: you can use the Read operation. When bit 1 is set, the file is Writable: you can use the Write operation. When bit 2 is set, the file is Appendable: unless this bit is set, you will not be able to write beyond the end of a file (such writes will result in an error 0x307202)

fn open_file_as_ipipe(
    &mut self,
    manager: WorkQueue<'static>,
    mode: u32,
    path: &FileSystemPath
) -> Result<IPipeProxy, Error>

Open a file at the specified path with the given mode flags.

mode controls how the file is opened, based on which bits are set: When bit 0 is set, the file is Readable: you can use the Read operation. When bit 1 is set, the file is Writable: you can use the Write operation. When bit 2 is set, the file is Appendable: unless this bit is set, you will not be able to write beyond the end of a file (such writes will result in an error 0x307202)

fn open_directory(
    &mut self,
    manager: WorkQueue<'static>,
    filter_flags: u32,
    path: &FileSystemPath
) -> Result<IDirectoryProxy, Error>

Open a directory at the specified path with the given filter_flags flags.

fn get_free_space_size(
    &mut self,
    manager: WorkQueue<'static>,
    path: &FileSystemPath
) -> Result<u64, Error>

Get the total availaible space on the given filesystem.

fn get_total_space_size(
    &mut self,
    manager: WorkQueue<'static>,
    path: &FileSystemPath
) -> Result<u64, Error>

Get the total size of the filesystem.

fn get_file_timestamp_raw(
    &mut self,
    manager: WorkQueue<'static>,
    path: &FileSystemPath
) -> Result<FileTimeStampRaw, Error>

Return the attached timestamps on a resource at the given path.

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

Get the type of this filesystem.

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...