new Ftp(params) → {Ftp}
Create an instance of the Ftp class.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
Returns:
- Instance of the ftp class
- Type
- Ftp
Methods
connect() → {Ftp}
Connect to the ftp server using the params set during Ftp object construction.
Returns:
- Instance of the ftp class
- Type
- Ftp
disconnect() → {Ftp}
Disconnect from the ftp server you are connected too.
Returns:
- Instance of the ftp class
- Type
- Ftp
getNames(params) → {Array.<string>}
Get a list of files on a path on the ftp server.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
Returns:
-
- Type
- Array.<string>
login() → {Ftp}
Login on the ftp server you are connected too.
Returns:
- Instance of the ftp class
- Type
- Ftp
logout() → {Ftp}
Logout from the ftp server you are connected too.
Returns:
- Instance of the ftp class
- Type
- Ftp
retrieveFile(params) → {string}
Retrieve a file from the ftp server.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
Returns:
- Contents of the file as text
- Type
- string