pub struct LocalFsBackend { /* private fields */ }Expand description
Local-filesystem backend, sandboxed at a single root directory.
Cheap to clone: internally an Arc<cap_std::fs::Dir> plus a flag.
Implementations§
Trait Implementations§
Source§fn open<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 SmbPath,
opts: OpenOptions,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Handle>, SmbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn open<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 SmbPath,
opts: OpenOptions,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Handle>, SmbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Open or create a file or directory. Returns a fresh handle.
Source§fn unlink<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 SmbPath,
) -> Pin<Box<dyn Future<Output = Result<(), SmbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn unlink<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 SmbPath,
) -> Pin<Box<dyn Future<Output = Result<(), SmbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Unlink (delete) a file. Directories: must be empty. v1 does not
recursively delete.
Source§fn rename<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 SmbPath,
to: &'life2 SmbPath,
) -> Pin<Box<dyn Future<Output = Result<(), SmbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn rename<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 SmbPath,
to: &'life2 SmbPath,
) -> Pin<Box<dyn Future<Output = Result<(), SmbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Rename
from to to. The backend must reject if to already exists.Source§fn capabilities(&self) -> BackendCapabilities
fn capabilities(&self) -> BackendCapabilities
Static capabilities. The dispatcher consults these at TREE_CONNECT and
uses
is_read_only to clamp authz.Auto Trait Implementations§
impl Freeze for LocalFsBackend
impl RefUnwindSafe for LocalFsBackend
impl Send for LocalFsBackend
impl Sync for LocalFsBackend
impl Unpin for LocalFsBackend
impl UnsafeUnpin for LocalFsBackend
impl UnwindSafe for LocalFsBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more