Modules

filter

 

Objects/Functions

module (N/sftp)

SuiteScript 2.0

Connection.list(options)

{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
Supported Script Types: Server-side scripts For more information, see SuiteScript 2.0 Script Types.
Governance: 10 units
Module: N/sftp Module
Since: 2019.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=Connection.list(options)

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