pub struct Fs<'s> { /* private fields */ }
Expand description

A struct used to perform operations on remote filesystem.

Implementations

Return the underlying sftp.

Return current working dir.

Set current working dir.

  • cwd - Can include ~. If it is empty, then it is set to use the default directory set by the remote sftp-server.

Open a remote dir

Create a directory builder.

Creates a new, empty directory at the provided path.

Removes an existing, empty directory.

Removes a file from remote filesystem.

Returns the canonical, absolute form of a path with all intermediate components normalized and symbolic links resolved.

Creates a new hard link on the remote filesystem.

Creates a new symlink on the remote filesystem.

Renames a file or directory to a new name, replacing the original file if to already exists.

This will not work if the new name is on a different mount point.

Reads a symbolic link, returning the file that the link points to.

Change the metadata of a file or a directory.

Changes the permissions found on a file or a directory.

Given a path, queries the file system to get information about a file, directory, etc.

Queries the file system metadata for a path.

Reads the entire contents of a file into a bytes.

Open/Create a file for writing and write the entire contents into it.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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.

Calls U::from(self).

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

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

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.