Core

FTP

FTP helper.

12 public methods

Import

from Xenonix.Core import FTP

Search this API

Filter methods, arguments, and configuration keys on this page.

Configuration

Use Config(...) with these keys where the class exposes configuration.

This object does not expose a public Config table.

Public methods

Create

Creates a new FTP instance.

Create(Host, Port=None, Protocol='FTP')

Arguments

Argument Default Accepted values What it does
Host Required Any valid value Host IP Address
Port None 21, 22 Host Server Port.
Protocol 'FTP' FTP, SFTP, FTPS Protocol value used by the operation.

Output

Creates a new FTP object.

Login

Runs the Login operation for FTP.

Login(Username, Password)

Arguments

Argument Default Accepted values What it does
Username Required Any valid value Username value used by the operation.
Password Required Any valid value Password value used by the operation.

Output

Returns the calculated result.

Logout

Runs the Logout operation for FTP.

Logout()

Arguments

No arguments.

Output

Returns structured data such as a list or dictionary.

Upload

Runs the Upload operation for FTP.

Upload(Local_Path, Remote_Path='.', Callback=None)

Arguments

Argument Default Accepted values What it does
Local_Path Required Any valid value Local Path value used by the operation.
Remote_Path '.' . Mode/value selector for remote path.
Callback None Any valid value Optional callback function called during processing.

Output

Returns structured data such as a list or dictionary.

Download

Runs the Download operation for FTP.

Download(Remote_Path, Save_Dir='.', Callback=None)

Arguments

Argument Default Accepted values What it does
Remote_Path Required Any valid value Remote Path value used by the operation.
Save_Dir '.' Any valid value Save Dir value used by the operation.
Callback None Any valid value Optional callback function called during processing.

Output

Returns structured data such as a list or dictionary.

List

Runs the List operation for FTP.

List(Path='.')

Arguments

Argument Default Accepted values What it does
Path '.' Any valid value File path used for reading or writing.

Output

Returns structured data such as a list or dictionary.

Size

Runs the Size operation for FTP.

Size(Remote_Path, Type='B')

Arguments

Argument Default Accepted values What it does
Remote_Path Required Any valid value Remote Path value used by the operation.
Type 'B' Any valid value Type value used by the operation.

Output

Returns structured data such as a list or dictionary.

Delete

Removes the requested item.

Delete(Remote_Path)

Arguments

Argument Default Accepted values What it does
Remote_Path Required Any valid value Remote Path value used by the operation.

Output

Returns structured data such as a list or dictionary.

Create

Runs the Create operation for FTP.

Create(Remote_Path)

Arguments

Argument Default Accepted values What it does
Remote_Path Required Any valid value Remote Path value used by the operation.

Output

Returns structured data such as a list or dictionary.

Rename

Runs the Rename operation for FTP.

Rename(Old_Path, New_Path)

Arguments

Argument Default Accepted values What it does
Old_Path Required Any valid value Old Path value used by the operation.
New_Path Required Any valid value New Path value used by the operation.

Output

Returns structured data such as a list or dictionary.

Exists

Runs the Exists operation for FTP.

Exists(Remote_Path)

Arguments

Argument Default Accepted values What it does
Remote_Path Required Any valid value Remote Path value used by the operation.

Output

Returns structured data such as a list or dictionary.

Info

Runs the Info operation for FTP.

Info(Remote_Path)

Arguments

Argument Default Accepted values What it does
Remote_Path Required Any valid value Remote Path value used by the operation.

Output

Returns structured data such as a list or dictionary.