pub struct Filesystem { /* private fields */ }Expand description
StorageBackend that uses a local filesystem, like a traditional FTP server.
Implementations§
Source§impl Filesystem
impl Filesystem
Trait Implementations§
Source§impl StorageBackend for Filesystem
impl StorageBackend for Filesystem
Source§fn stat<P: AsRef<Path>>(
&self,
path: P,
) -> Box<dyn Future<Item = Self::Metadata, Error = Self::Error> + Send>
fn stat<P: AsRef<Path>>( &self, path: P, ) -> Box<dyn Future<Item = Self::Metadata, Error = Self::Error> + Send>
Returns the
Metadata for the given file.Source§fn list<P: AsRef<Path>>(
&self,
path: P,
) -> Box<dyn Stream<Item = Fileinfo<PathBuf, Self::Metadata>, Error = Self::Error> + Send>
fn list<P: AsRef<Path>>( &self, path: P, ) -> Box<dyn Stream<Item = Fileinfo<PathBuf, Self::Metadata>, Error = Self::Error> + Send>
Returns the list of files in the given directory.
Source§fn get<P: AsRef<Path>>(
&self,
path: P,
) -> Box<dyn Future<Item = File, Error = Self::Error> + Send>
fn get<P: AsRef<Path>>( &self, path: P, ) -> Box<dyn Future<Item = File, Error = Self::Error> + Send>
Returns the content of the given file.
Source§fn put<P: AsRef<Path>, R: AsyncRead + Send + 'static>(
&self,
bytes: R,
path: P,
) -> Box<dyn Future<Item = u64, Error = Self::Error> + Send>
fn put<P: AsRef<Path>, R: AsyncRead + Send + 'static>( &self, bytes: R, path: P, ) -> Box<dyn Future<Item = u64, Error = Self::Error> + Send>
Write the given bytes to the given file.
Source§fn del<P: AsRef<Path>>(
&self,
path: P,
) -> Box<dyn Future<Item = (), Error = Self::Error> + Send>
fn del<P: AsRef<Path>>( &self, path: P, ) -> Box<dyn Future<Item = (), Error = Self::Error> + Send>
Delete the given file.
Source§fn mkd<P: AsRef<Path>>(
&self,
path: P,
) -> Box<dyn Future<Item = (), Error = Self::Error> + Send>
fn mkd<P: AsRef<Path>>( &self, path: P, ) -> Box<dyn Future<Item = (), Error = Self::Error> + Send>
Create the given directory.
Source§fn list_fmt<P: AsRef<Path>>(
&self,
path: P,
) -> Box<dyn Future<Item = Cursor<Vec<u8>>, Error = Error> + Send>where
<Self as StorageBackend>::Metadata: Metadata + 'static,
<Self as StorageBackend>::Error: Send + 'static,
fn list_fmt<P: AsRef<Path>>(
&self,
path: P,
) -> Box<dyn Future<Item = Cursor<Vec<u8>>, Error = Error> + Send>where
<Self as StorageBackend>::Metadata: Metadata + 'static,
<Self as StorageBackend>::Error: Send + 'static,
Returns some bytes that make up a directory listing that can immediately be send to the
client.
Source§fn nlst<P: AsRef<Path>>(
&self,
path: P,
) -> Box<dyn Future<Item = Cursor<Vec<u8>>, Error = Error> + Send>where
<Self as StorageBackend>::Metadata: Metadata + 'static,
<Self as StorageBackend>::Error: Send + 'static,
fn nlst<P: AsRef<Path>>(
&self,
path: P,
) -> Box<dyn Future<Item = Cursor<Vec<u8>>, Error = Error> + Send>where
<Self as StorageBackend>::Metadata: Metadata + 'static,
<Self as StorageBackend>::Error: Send + 'static,
Returns some bytes that make up a NLST directory listing (only the basename) that can
immediately be send to the client.
Auto Trait Implementations§
impl Freeze for Filesystem
impl RefUnwindSafe for Filesystem
impl Send for Filesystem
impl Sync for Filesystem
impl Unpin for Filesystem
impl UnwindSafe for Filesystem
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