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

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

The trait that defines a filesystem.

Required methods

pub fn open<'a>(
    &'a self,
    path: &'a DavPath,
    options: OpenOptions
) -> FsFuture<'_, Box<dyn DavFile>>
[src]

Open a file.

pub fn read_dir<'a>(
    &'a self,
    path: &'a DavPath,
    meta: ReadDirMeta
) -> FsFuture<'_, FsStream<Box<dyn DavDirEntry>>>
[src]

Perform read_dir.

pub fn metadata<'a>(
    &'a self,
    path: &'a DavPath
) -> FsFuture<'_, Box<dyn DavMetaData>>
[src]

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.

pub fn create_dir<'a>(&'a self, path: &'a DavPath) -> FsFuture<'_, ()>[src]

Create a directory.

The default implementation returns FsError::NotImplemented.

pub fn remove_dir<'a>(&'a self, path: &'a DavPath) -> FsFuture<'_, ()>[src]

Remove a directory.

The default implementation returns FsError::NotImplemented.

pub fn remove_file<'a>(&'a self, path: &'a DavPath) -> FsFuture<'_, ()>[src]

Remove a file.

The default implementation returns FsError::NotImplemented.

pub fn rename<'a>(
    &'a self,
    from: &'a DavPath,
    to: &'a DavPath
) -> FsFuture<'_, ()>
[src]

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.

pub fn copy<'a>(
    &'a self,
    from: &'a DavPath,
    to: &'a DavPath
) -> FsFuture<'_, ()>
[src]

Copy a file

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

The default implementation returns FsError::NotImplemented.

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

Indicator that tells if this filesystem driver supports DAV properties.

The default implementation returns false.

pub fn patch_props<'a>(
    &'a self,
    path: &'a DavPath,
    patch: Vec<(bool, DavProp)>
) -> FsFuture<'_, Vec<(StatusCode, DavProp)>>
[src]

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

The default implementation returns FsError::NotImplemented.

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

List/get the DAV properties of a node.

The default implementation returns FsError::NotImplemented.

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

Get one specific named property of a node.

The default implementation returns FsError::NotImplemented.

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

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]

impl DavFileSystem for MemFs[src]

Loading content...