SFtpDir Node.js Reference Documentation

SFtpDir

Represents a remote SFTP directory listing.

Object Creation

var obj = new chilkat.SFtpDir();

Properties

NumFilesAndDirs

· integer, read-only

The number of entries in this directory listing.

OriginalPath

· string, read-only

The original path used to fetch this directory listing. This is the string that was originally passed to the OpenDir method when the directory was read.

Methods

var ret_sFtpFile = GetFileObject(index);

· Returns a SFtpFile
· index Number

Returns the Nth entry in the directory. Indexing begins at 0.

var retStr = GetFilename(index);

· Returns a String.
· index Number

Returns the Nth filename in the directory (indexing begins at 0).

Returns true for success, false for failure.

var status = LoadTaskResult(task);

· Returns Boolean (true for success, false for failure).
· taskbool
Introduced in version 9.5.0.52

Loads the SFTP directory object from a completed asynchronous task.

Returns true for success, false for failure.