pub struct Filesystem { /* private fields */ }
Expand description

The Filesystem struct is an implementation of the StorageBackend trait that keeps its files inside a specific root directory on local disk.

Implementations§

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§

Formats the value using the given formatter. Read more
The concrete type of the metadata used by this storage backend.
Tells which optional features are supported by the storage back-end Return a value with bits set according to the FEATURE_* constants.
Returns the Metadata for the given file.
Returns the list of files in the given directory.
Returns the content of the given file from offset start_pos. The starting position will only be greater than zero if the storage back-end implementation advertises to support partial reads through the supported_features method i.e. the result from supported_features yield 1 if a logical and operation is applied with FEATURE_RESTART.
Writes bytes from the given reader to the specified path starting at offset start_pos in the file
Deletes the file at the given path.
Deletes the given directory.
Creates the given directory.
Renames the given file to the given new filename.
Changes the working directory to the given path.
Implement to set the name of the storage back-end. By default it returns the type signature.
Returns the MD5 hash for the given file. Read more
Gets the content of the given FTP file from offset start_pos file by copying it to the output writer. The starting position will only be greater than zero if the storage back-end implementation advertises to support partial reads through the supported_features method i.e. the result from supported_features yield 1 if a logical and operation is applied with FEATURE_RESTART.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more