Global

Methods

cdup() → {string}

Changes to parent directory
Source:
Returns:
Result FTP code and message
Type
string

cwd(path) → {string}

Changes the current working directory
Parameters:
Name Type Description
path string
Source:
Returns:
Result FTP code and message
Type
string

(async) initConnection(socket)

Intialize a new socket connection
Parameters:
Name Type Description
socket Socket
Source:

list(args) → {string}

Returns information of a file or directory if specified, else information of the current working directory is returned
Parameters:
Name Type Description
args string Any generic linux ls arguments
Source:
Returns:
List result or FTP error code and message
Type
string

mkd(nodeName) → {string}

Creates a new directory
Parameters:
Name Type Description
nodeName string
Source:
Returns:
Result FTP code and message
Type
string

pwd() → {string}

Returns the current working directory
Source:
Returns:
Result FTP code and message
Type
string

(async) retr(nodeName) → {buffer|string}

Retrieves a node
Parameters:
Name Type Description
nodeName string
Source:
Returns:
Node buffer or FTP error code and message
Type
buffer | string

rmd(nodeName) → {string}

Removes a node
Parameters:
Name Type Description
nodeName string
Source:
Returns:
Result FTP code and message
Type
string

rnfr(nodeName)

Saves node name to rename in memory rnto() should be called right after
Parameters:
Name Type Description
nodeName String
Source:

rnto(nodeName) → {string}

Renames corresponding node according to previous rnfr() call
Parameters:
Name Type Description
nodeName string
Source:
Returns:
Result FTP code and message
Type
string

(async) stor(nodeName, nodeBuffer) → {boolean}

Stores a new node
Parameters:
Name Type Description
nodeName string
nodeBuffer buffer
Source:
Returns:
Type
boolean