SftpClient class

Constructors

SftpClient(SSHChannel _channel, {SSHPrintHandler? printDebug, SSHPrintHandler? printTrace})

Properties

handshake Future<SftpHandsake>
The handshake information received from the server.
no setter
hashCode int
The hash code for this object.
no setterinherited
printDebug SSHPrintHandler?
final
printTrace SSHPrintHandler?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

absolute(String path) Future<String>
Returns the absolute path of path.
close() → void
Close the sftp session.
Creates a symbolic link at targetPath that points to linkPath.
listdir(String path) Future<List<SftpName>>
List the items of a directory. This is a convenience method wrapping readdir.
mkdir(String path, [SftpFileAttrs? attrs]) Future<void>
Makes a directory at the given path.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open(String path, {SftpFileOpenMode mode = SftpFileOpenMode.read}) Future<SftpFile>
Opens a file for reading or/and writing.
readdir(String path) Stream<List<SftpName>>
Reads the items of a directory. Returns an Stream of SftpName chunks. Use listdir instead of this unless the directory contains a large number of items.
Reads the target of a symbolic link.
remove(String filename) Future<void>
Remove a file whose name is filename. This can only be used to remove files. Use rmdir to remove a directory.
rename(String oldPath, String newPath) Future<void>
Renames a file or directory from oldPath to newPath.
rmdir(String dirname) Future<void>
Removes a directory whose name is dirname. This can only be used to remove directories. Use remove to remove a file. This will fail if the directory is not empty.
setStat(String path, SftpFileAttrs attrs) Future<void>
Sets the attributes of the file at path.
stat(String path, {bool followLink = true}) Future<SftpFileAttrs>
Gets the attributes of the file at path.
statvfs(String path) Future<SftpStatVfs>
Gets the information about a mounted filesystem. path is the pathname of any file within the mounted filesystem.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited