This module implements an SSH FTP (SFTP) client. SFTP is a secure, encrypted file transfer service available for SSH.
Type definitions that are used more than once in this module, or abstractions to indicate the intended use of the data type, or both:
opaque() - as returned by
=
If the request functions for the SFTP channel return
The
Reads from an open file, without waiting for the result. If the
handle is valid, the function returns
Writes to an open file, without waiting for the result. If the
handle is valid, the function returns
Closes a handle to an open file or directory on the server.
Deletes the file specified by
Deletes a directory specified by
Lists the given directory on the server, returning the filenames as a list of strings.
Creates a directory specified by
Creates a symbolic link pointing to
Opens a file on the server and returns a handle, which can be used for reading or writing.
Opens a handle to a directory on the server. The handle can be used for reading directory contents.
Opens a handle to a tar file on the server, associated with
For code exampel see Section
The
The
The
Sets the file position of the file referenced by
The same as
Absolute offset.
Offset from the current position.
Offset from the end of file.
The same as eariler with
The
The
Reads
If the file is read past
Reads a file from the server, and returns the data in a binary,
like
Returns a
Reads the link target from the symbolic link specified
by
Returns a
Renames a file named
If no connection reference is provided, a connection is set
up, and the new connection is returned. An SSH channel process
is started to handle the communication with the SFTP server.
The returned
Options:
The time-out is passed to the
Desired SFTP protocol version. The actual version is the minimum of the desired version and the maximum supported versions by the SFTP server.
All other options are directly passed to
Stops an SFTP channel. Does not close the SSH connection.
Use
Writes
Typical error reasons:
File is not opened for writing.
No space is left on the device.
Writes a file to the server, like
Writes file information from a