[][src]Trait webdav_handler::fs::DavFileSystem

pub trait DavFileSystem: Sync + Send + BoxCloneFs {
    fn open<'a>(
        &'a self,
        path: &'a WebPath,
        options: OpenOptions
    ) -> FsFuture<Box<dyn DavFile>>;
fn read_dir<'a>(
        &'a self,
        path: &'a WebPath,
        meta: ReadDirMeta
    ) -> FsFuture<Pin<Box<dyn Stream<Item = Box<dyn DavDirEntry>> + Send>>>;
fn metadata<'a>(
        &'a self,
        path: &'a WebPath
    ) -> FsFuture<Box<dyn DavMetaData>>; fn symlink_metadata<'a>(
        &'a self,
        path: &'a WebPath
    ) -> FsFuture<Box<dyn DavMetaData>> { ... }
fn create_dir<'a>(&'a self, path: &'a WebPath) -> FsFuture<()> { ... }
fn remove_dir<'a>(&'a self, path: &'a WebPath) -> FsFuture<()> { ... }
fn remove_file<'a>(&'a self, path: &'a WebPath) -> FsFuture<()> { ... }
fn rename<'a>(&'a self, from: &'a WebPath, to: &'a WebPath) -> FsFuture<()> { ... }
fn copy<'a>(&'a self, from: &'a WebPath, to: &'a WebPath) -> FsFuture<()> { ... }
fn have_props<'a>(
        &'a self,
        path: &'a WebPath
    ) -> Pin<Box<dyn Future<Output = bool> + Send + 'a>> { ... }
fn patch_props<'a>(
        &'a self,
        path: &'a WebPath,
        set: Vec<DavProp>,
        remove: Vec<DavProp>
    ) -> FsFuture<Vec<(StatusCode, DavProp)>> { ... }
fn get_props<'a>(
        &'a self,
        path: &'a WebPath,
        do_content: bool
    ) -> FsFuture<Vec<DavProp>> { ... }
fn get_prop<'a>(
        &'a self,
        path: &'a WebPath,
        prop: DavProp
    ) -> FsFuture<Vec<u8>> { ... }
fn get_quota<'a>(&'a self) -> FsFuture<(u64, Option<u64>)> { ... } }

The trait that defines a filesystem.

Required methods

fn open<'a>(
    &'a self,
    path: &'a WebPath,
    options: OpenOptions
) -> FsFuture<Box<dyn DavFile>>

Open a file.

fn read_dir<'a>(
    &'a self,
    path: &'a WebPath,
    meta: ReadDirMeta
) -> FsFuture<Pin<Box<dyn Stream<Item = Box<dyn DavDirEntry>> + Send>>>

Perform read_dir.

fn metadata<'a>(&'a self, path: &'a WebPath) -> FsFuture<Box<dyn DavMetaData>>

Return the metadata of a file or directory.

Loading content...

Provided methods

Return the metadata of a file, directory or symbolic link.

Differs from metadata() that if the path is a symbolic link, it return the metadata for the link itself, not for the thing it points to.

The default implementation returns FsError::NotImplemented.

fn create_dir<'a>(&'a self, path: &'a WebPath) -> FsFuture<()>

Create a directory.

The default implementation returns FsError::NotImplemented.

fn remove_dir<'a>(&'a self, path: &'a WebPath) -> FsFuture<()>

Remove a directory.

The default implementation returns FsError::NotImplemented.

fn remove_file<'a>(&'a self, path: &'a WebPath) -> FsFuture<()>

Remove a file.

The default implementation returns FsError::NotImplemented.

fn rename<'a>(&'a self, from: &'a WebPath, to: &'a WebPath) -> FsFuture<()>

Rename a file or directory.

Source and destination must be the same type (file/dir). If the destination already exists and is a file, it should be replaced. If it is a directory it should give an error.

The default implementation returns FsError::NotImplemented.

fn copy<'a>(&'a self, from: &'a WebPath, to: &'a WebPath) -> FsFuture<()>

Copy a file

Should also copy the DAV properties, if properties are implemented.

The default implementation returns FsError::NotImplemented.

fn have_props<'a>(
    &'a self,
    path: &'a WebPath
) -> Pin<Box<dyn Future<Output = bool> + Send + 'a>>

Indicator that tells if this filesystem driver supports DAV properties.

The default implementation returns false.

fn patch_props<'a>(
    &'a self,
    path: &'a WebPath,
    set: Vec<DavProp>,
    remove: Vec<DavProp>
) -> FsFuture<Vec<(StatusCode, DavProp)>>

Patch the DAV properties of a node (add/remove props)

The default implementation returns FsError::NotImplemented.

fn get_props<'a>(
    &'a self,
    path: &'a WebPath,
    do_content: bool
) -> FsFuture<Vec<DavProp>>

List/get the DAV properties of a node.

The default implementation returns FsError::NotImplemented.

fn get_prop<'a>(&'a self, path: &'a WebPath, prop: DavProp) -> FsFuture<Vec<u8>>

Get one specific named property of a node.

The default implementation returns FsError::NotImplemented.

fn get_quota<'a>(&'a self) -> FsFuture<(u64, Option<u64>)>

Get quota of this filesystem (used/total space).

The first value returned is the amount of space used, the second optional value is the total amount of space (used + available).

The default implementation returns FsError::NotImplemented.

Loading content...

Implementors

impl DavFileSystem for LocalFs[src]

fn have_props<'a>(
    &'a self,
    path: &'a WebPath
) -> Pin<Box<dyn Future<Output = bool> + Send + 'a>>
[src]

fn patch_props<'a>(
    &'a self,
    path: &'a WebPath,
    set: Vec<DavProp>,
    remove: Vec<DavProp>
) -> FsFuture<Vec<(StatusCode, DavProp)>>
[src]

fn get_props<'a>(
    &'a self,
    path: &'a WebPath,
    do_content: bool
) -> FsFuture<Vec<DavProp>>
[src]

fn get_prop<'a>(&'a self, path: &'a WebPath, prop: DavProp) -> FsFuture<Vec<u8>>[src]

fn get_quota<'a>(&'a self) -> FsFuture<(u64, Option<u64>)>[src]

impl DavFileSystem for MemFs[src]

fn get_quota<'a>(&'a self) -> FsFuture<(u64, Option<u64>)>[src]

Loading content...