[−][src]Struct libunftp::storage::filesystem::Filesystem
The Filesystem struct is an implementation of the StorageBackend trait that keeps its files inside a specific root directory on local disk.
Implementations
impl Filesystem
[src]
pub fn new<P: Into<PathBuf>>(root: P) -> Self
[src]
Create a new Filesystem backend, with the given root. No operations can take place outside
of the root. For example, when the Filesystem
root is set to /srv/ftp
, and a client
asks for hello.txt
, the server will send it /srv/ftp/hello.txt
.
Trait Implementations
impl Debug for Filesystem
[src]
impl<U: Send + Sync + Debug> StorageBackend<U> for Filesystem
[src]
type Metadata = Metadata
The concrete type of the metadata used by this storage backend.
pub fn supported_features(&self) -> u32
[src]
pub fn metadata<'life0, 'life1, 'async_trait, P: AsRef<Path> + Send + Debug>(
&'life0 self,
_user: &'life1 Option<U>,
path: P
) -> Pin<Box<dyn Future<Output = Result<Self::Metadata>> + Send + 'async_trait>> where
P: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
_user: &'life1 Option<U>,
path: P
) -> Pin<Box<dyn Future<Output = Result<Self::Metadata>> + Send + 'async_trait>> where
P: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
pub fn list<'life0, 'life1, 'async_trait, P>(
&'life0 self,
_user: &'life1 Option<U>,
path: P
) -> Pin<Box<dyn Future<Output = Result<Vec<Fileinfo<PathBuf, Self::Metadata>>>> + Send + 'async_trait>> where
P: AsRef<Path> + Send + Debug,
Self::Metadata: Metadata,
P: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
_user: &'life1 Option<U>,
path: P
) -> Pin<Box<dyn Future<Output = Result<Vec<Fileinfo<PathBuf, Self::Metadata>>>> + Send + 'async_trait>> where
P: AsRef<Path> + Send + Debug,
Self::Metadata: Metadata,
P: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
pub fn get<'life0, 'life1, 'async_trait, P: AsRef<Path> + Send + Debug>(
&'life0 self,
_user: &'life1 Option<U>,
path: P,
start_pos: u64
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncRead + Send + Sync + Unpin>>> + Send + 'async_trait>> where
P: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
_user: &'life1 Option<U>,
path: P,
start_pos: u64
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncRead + Send + Sync + Unpin>>> + Send + 'async_trait>> where
P: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
pub fn put<'life0, 'life1, 'async_trait, P: AsRef<Path> + Send, R: AsyncRead + Send + Sync + 'static + Unpin>(
&'life0 self,
_user: &'life1 Option<U>,
bytes: R,
path: P,
start_pos: u64
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>> where
P: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
_user: &'life1 Option<U>,
bytes: R,
path: P,
start_pos: u64
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>> where
P: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
pub fn del<'life0, 'life1, 'async_trait, P: AsRef<Path> + Send + Debug>(
&'life0 self,
_user: &'life1 Option<U>,
path: P
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
P: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
_user: &'life1 Option<U>,
path: P
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
P: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
pub fn rmd<'life0, 'life1, 'async_trait, P: AsRef<Path> + Send + Debug>(
&'life0 self,
_user: &'life1 Option<U>,
path: P
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
P: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
_user: &'life1 Option<U>,
path: P
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
P: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
pub fn mkd<'life0, 'life1, 'async_trait, P: AsRef<Path> + Send + Debug>(
&'life0 self,
_user: &'life1 Option<U>,
path: P
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
P: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
_user: &'life1 Option<U>,
path: P
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
P: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
pub fn rename<'life0, 'life1, 'async_trait, P: AsRef<Path> + Send + Debug>(
&'life0 self,
_user: &'life1 Option<U>,
from: P,
to: P
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
P: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
_user: &'life1 Option<U>,
from: P,
to: P
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
P: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
pub fn cwd<'life0, 'life1, 'async_trait, P: AsRef<Path> + Send + Debug>(
&'life0 self,
_user: &'life1 Option<U>,
path: P
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
P: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
_user: &'life1 Option<U>,
path: P
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
P: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
#[must_use]pub fn list_fmt<'life0, 'life1, 'async_trait, P>(
&'life0 self,
user: &'life1 Option<U>,
path: P
) -> Pin<Box<dyn Future<Output = Result<Cursor<Vec<u8>>, Error>> + Send + 'async_trait>> where
P: AsRef<Path> + Send + Debug,
Self::Metadata: Metadata + 'static,
P: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
user: &'life1 Option<U>,
path: P
) -> Pin<Box<dyn Future<Output = Result<Cursor<Vec<u8>>, Error>> + Send + 'async_trait>> where
P: AsRef<Path> + Send + Debug,
Self::Metadata: Metadata + 'static,
P: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
#[must_use]pub fn nlst<'life0, 'life1, 'async_trait, P>(
&'life0 self,
user: &'life1 Option<U>,
path: P
) -> Pin<Box<dyn Future<Output = Result<Cursor<Vec<u8>>, Error>> + Send + 'async_trait>> where
P: AsRef<Path> + Send + Debug,
Self::Metadata: Metadata + 'static,
P: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
user: &'life1 Option<U>,
path: P
) -> Pin<Box<dyn Future<Output = Result<Cursor<Vec<u8>>, Error>> + Send + 'async_trait>> where
P: AsRef<Path> + Send + Debug,
Self::Metadata: Metadata + 'static,
P: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
#[must_use]pub fn get_into<'a, 'life0, 'life1, 'async_trait, P, W: ?Sized>(
&'life0 self,
user: &'life1 Option<U>,
path: P,
start_pos: u64,
output: &'a mut W
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>> where
W: AsyncWrite + Unpin + Sync + Send,
P: AsRef<Path> + Send + Debug,
'a: 'async_trait,
P: 'async_trait,
W: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
user: &'life1 Option<U>,
path: P,
start_pos: u64,
output: &'a mut W
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>> where
W: AsyncWrite + Unpin + Sync + Send,
P: AsRef<Path> + Send + Debug,
'a: 'async_trait,
P: 'async_trait,
W: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations
impl RefUnwindSafe for Filesystem
[src]
impl Send for Filesystem
[src]
impl Sync for Filesystem
[src]
impl Unpin for Filesystem
[src]
impl UnwindSafe for Filesystem
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,