[][src]Trait sunrise_fs::interface::filesystem::FileSystemOperations

pub trait FileSystemOperations: Debug + Sync + Send {
    fn create_file(&self, path: &str, size: u64) -> LibUserResult<()>;
fn create_directory(&self, path: &str) -> LibUserResult<()>;
fn rename_file(&self, old_path: &str, new_path: &str) -> LibUserResult<()>;
fn rename_directory(
        &self,
        old_path: &str,
        new_path: &str
    ) -> LibUserResult<()>;
fn delete_file(&self, path: &str) -> LibUserResult<()>;
fn delete_directory(&self, path: &str) -> LibUserResult<()>;
fn get_entry_type(&self, path: &str) -> LibUserResult<DirectoryEntryType>;
fn open_file(
        &self,
        path: &str,
        mode: FileModeFlags
    ) -> LibUserResult<Box<dyn FileOperations>>;
fn open_directory(
        &self,
        path: &str,
        filter: DirFilterFlags
    ) -> LibUserResult<Box<dyn DirectoryOperations>>;
fn get_free_space_size(&self, path: &str) -> LibUserResult<u64>;
fn get_total_space_size(&self, path: &str) -> LibUserResult<u64>;
fn get_file_timestamp_raw(
        &self,
        path: &str
    ) -> LibUserResult<FileTimeStampRaw>;
fn get_filesystem_type(&self) -> FileSystemType; }

Represent the operation on a filesystem.

Required methods

fn create_file(&self, path: &str, size: u64) -> LibUserResult<()>

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

fn create_directory(&self, path: &str) -> LibUserResult<()>

Create a directory at the specified path.

fn rename_file(&self, old_path: &str, new_path: &str) -> LibUserResult<()>

Rename a file at old_path into new_path.

fn rename_directory(&self, old_path: &str, new_path: &str) -> LibUserResult<()>

Rename a directory at old_path into new_path

fn delete_file(&self, path: &str) -> LibUserResult<()>

Delete a file at the specified path.

fn delete_directory(&self, path: &str) -> LibUserResult<()>

Delete a directory at the specified path.

fn get_entry_type(&self, path: &str) -> LibUserResult<DirectoryEntryType>

Get the informations about an entry on the filesystem.

fn open_file(
    &self,
    path: &str,
    mode: FileModeFlags
) -> LibUserResult<Box<dyn FileOperations>>

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

fn open_directory(
    &self,
    path: &str,
    filter: DirFilterFlags
) -> LibUserResult<Box<dyn DirectoryOperations>>

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

fn get_free_space_size(&self, path: &str) -> LibUserResult<u64>

Get the total availaible space on the given filesystem.

fn get_total_space_size(&self, path: &str) -> LibUserResult<u64>

Get the total size of the filesystem.

fn get_file_timestamp_raw(&self, path: &str) -> LibUserResult<FileTimeStampRaw>

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

fn get_filesystem_type(&self) -> FileSystemType

Get the type of the filesystem

Loading content...

Implementors

impl FileSystemOperations for FatFileSystem[src]

Loading content...