Modules
Objects/Functions
SuiteScript 2.0
{Connection}.list({path: {String},sort: {String}})
N/sftp Module
Connection.list()
Method Description:
Lists the remote directory.
This method returns an array of Objects. Each Object includes the following properties with associated values:
directory- A flag whether the entry corresponds to a directory or a file. If true, it is a directory. If false, it is a file.
name- The name of the file
size- The size of the file
lastModified- The last modification date
Returns:
Array
Example:
// Code Example 1
// Add additional code ...
var connection = sftp.createConnection({
username: 'sftpuser',
keyId:"custkey2",
url: '172.25.184.111',
port: 22,
directory: '',
hostKey: "hostkey"
});
// Add additional code
//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_1557235176.html