Connection.list(options)
Method Description |
Lists the remote directory. This method returns an array of Objects. Each Object includes the following properties with associated values:
|
Returns |
Array<Object> |
Supported Script Types |
Server scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
10 units |
Module |
|
Since |
2019.2 |
Parameters
The options parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
Since |
---|---|---|---|---|
|
String |
required |
The relative path to directory of file that will be downloaded. |
2019.2 |
|
String |
required |
The sort options. Use values from sftp.Sort. |
2019.2 |
Errors
Error Code |
Thrown If |
---|---|
|
The directory does not exist on the remote FTP server. |
|
Access to the file or directory on the remote FTP server was denied. |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/sftp Module Script Samples.
// Add additional code
...
let objConnection = connection.list({
path: 'yyy/test'
});
...
// Add additional code
Wildcards are accepted. The ? symbol can represent any character. The * symbol can represent any number of characters.