Class: CMD

CMD

new CMD()

Source:

Members

codes :object

List of command response codes and their attributing event that will be fired; you can add your own event listeners to listen to these codes
Type:
  • object
Properties:
Name Type Description
150 number dataPortReady
220 number login
226 number transferComplete
227 number startPassive
230 number ready
250 number fileActionComplete [default: disabled]
257 number data capture [default: disabled]
331 number sendPass [default: disabled]
500 number unkownCommand
550 number transferError
553 number transferError
Source:

Methods

dataPortReady()

Sets the cueDataTransfer so we know we are specifically performing data fetching
Source:

error()

Emit an error on the FTP#socket object
Source:
Fires:

login()

Log in to the FTP server with set configuration
Source:

ready()

Emit a "ready" event on the FTP#socket object
Source:
Fires:

startPassive(data)

Opens a passive (PASV) connection to the FTP server with the data received from the socket that made the "PASV" request
Parameters:
Name Type Description
data string The returned socket data
Source:

transferComplete()

Emit a fileTransferComplete or dataTransferComplete event on the FTP#events object
Source:
Fires:
  • FTP#event:dataTransferComplete

unknownCommand()

Emit an error on the FTP#socket object
Source:
Fires: