SFtpDir PureBasic Reference Documentation

SFtpDir

Represents a remote SFTP directory listing.

Object Creation

obj.i = CkSFtpDir::ckCreate()

; Make sure to dispose of the object when finished like this:
CkSFtpDir::ckDispose(obj);

Properties

Declare.i ckNumFilesAndDirs(obj.i) ; (read-only)

The number of entries in this directory listing.

Declare.s ckOriginalPath(obj.i) ; (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

Declare.i ckGetFileObject(obj.i, index.i)

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

Declare.s ckGetFilename(obj.i, index.i)

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

Returns an empty string on failure. Use the LastMethodSuccess property to check for success.

Declare.i ckLoadTaskResult(obj.i, task.i)

Introduced in version 9.5.0.52

Loads the SFTP directory object from a completed asynchronous task.

Returns 1 for success, 0 for failure.