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:
=
The value is formed from the sftp error codes in the protocol-level responses as defined in
The codes are named as
=
If the request functions for the SFTP channel return
The request may have reached the server and may have been performed. However, no answer was received from the server within the expected time.
The
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.
Returns a
Depending on the underlying OS:es links might be followed and info on the final file, directory
etc is returned. See
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:
There are two ways to set a timeout for the underlying ssh connection:
The value defaults to
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
Writes a file to the server. The file is created if it does not exist but overwritten if it exists.
Writes file information from a