ExternalFileStore

Trait ExternalFileStore 

Source
pub trait ExternalFileStore {
    // Required methods
    async fn open_external(
        &self,
        at: Option<ObjID>,
        path: impl AsRef<Path>,
        flags: ExternalOpenFlags,
        mode: mode_t,
        link_to: Option<ObjID>,
    ) -> Result<ExternalFile>;
    async fn unlink_external(
        &self,
        at: Option<ObjID>,
        path: impl AsRef<Path>,
    ) -> Result<()>;
    async fn readlink_external(&self, id: ObjID) -> Result<String>;
    async fn readdir_external(
        &self,
        dir: ObjID,
        skip: usize,
        count: usize,
        entries: &mut Vec<ExternalFile>,
    ) -> Result<()>;
    async fn link_external(
        &self,
        file: &ExternalFile,
        at: Option<ObjID>,
        path: impl AsRef<Path>,
    ) -> Result<()>;
    async fn stat_external(&self, path: impl AsRef<Path>) -> Result<stat>;
    async fn fstat_external(&self, file: Option<ObjID>) -> Result<stat>;
    async fn symlink_external(
        &self,
        at: Option<ObjID>,
        target: impl AsRef<Path>,
        linkpath: impl AsRef<Path>,
    ) -> Result<()>;
}

Required Methods§

Source

async fn open_external( &self, at: Option<ObjID>, path: impl AsRef<Path>, flags: ExternalOpenFlags, mode: mode_t, link_to: Option<ObjID>, ) -> Result<ExternalFile>

Source

async fn readdir_external( &self, dir: ObjID, skip: usize, count: usize, entries: &mut Vec<ExternalFile>, ) -> Result<()>

Source

async fn stat_external(&self, path: impl AsRef<Path>) -> Result<stat>

Source

async fn fstat_external(&self, file: Option<ObjID>) -> Result<stat>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<D: Device> ExternalFileStore for Ext4Store<D>