FtpClient class
- Mixed in types
Constructors
- FtpClient({required FtpSocketInitOptions socketInitOptions, required FtpAuthOptions authOptions, LogCallback? logCallback})
-
Creates a new FTP client.
socketInitOptions
- options for socket initialization.authOptions
- options for authentication.logCallback
- callback for logging any ftp operations.
Properties
- currentDirectory → FtpDirectory
-
Returns current directory of file system.
no setter
- fs → FtpFileSystem
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- socket → FtpSocket
-
no setter
Methods
-
addTask(
FtpTask task) → void -
inherited
-
cancelTasks(
) → Future< void> -
inherited
-
changeDirectory(
String path) → Future< bool> -
changeDirectoryUp(
) → Future< bool> -
clearTasks(
) → void -
inherited
-
clone(
) → FtpClient -
connect(
) → Future< void> - Connects to the FTP server. And initializes the file system.
-
disconnect(
{bool safe = true}) → Future< void> - Disconnects from the FTP server.
-
getDirectory(
String path) → FtpDirectory -
Returns directory linked to current file system.
path
- path to the directory. ifpath
starts with '/' then it will be treated as absolute path. -
getFile(
String path) → FtpFile -
Returns file linked to current file system.
path
- path to the file. ifpath
starts with '/' then it will be treated as absolute path. -
getLink(
String path, String target) → FtpLink -
Returns link linked to current file system.
path
- path to the link. ifpath
starts with '/' then it will be treated as absolute path. -
isConnected(
) → Future< bool> - verify that client is connected
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resetTasks(
) → void -
inherited
-
runAsTask<
T> (FutureOr< T> task()) → Future<T> -
inherited
-
runSafe<
T> ({required FutureOr< T> task()}) → FtpTask<T> - run any ftp task with verification of connection
-
runTask<
T> (FtpTask< T> task) → Future<T> -
inherited
-
runTasks(
) → Future< void> -
run all tasks in queue, if any task fails, then next tasks will not be executed
and exception of failed task will be thrown
inherited
-
runTasksUnsafe(
) → Future< void> -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited