SFtpDir Delphi DLL Reference Documentation


Represents a remote SFTP directory listing.


function CkSFtpDir_Create: HCkSFtpDir; stdcall;

Creates an instance of the HCkSFtpDir object and returns a handle (i.e. a Pointer). The handle is passed in the 1st argument for the functions listed on this page.

procedure CkSFtpDir_Dispose(handle: HCkSFtpDir); stdcall;

Objects created by calling CkSFtpDir_Create must be freed by calling this method. A memory leak occurs if a handle is not disposed by calling this function.


function CkSFtpDir_getNumFilesAndDirs(objHandle: HCkSFtpDir): Integer; stdcall;

The number of entries in this directory listing.

procedure CkSFtpDir_getOriginalPath(objHandle: HCkSFtpDir; outPropVal: HCkString); stdcall;

function CkSFtpDir__originalPath(objHandle: HCkSFtpDir): PWideChar; stdcall;

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.


function CkSFtpDir_GetFileObject(objHandle: HCkSFtpDir;
    index: Integer): HCkSFtpFile; stdcall;

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

function CkSFtpDir_GetFilename(objHandle: HCkSFtpDir;
    index: Integer;
    outStr: HCkString): wordbool; stdcall;

function CkSFtpDir__getFilename(objHandle: HCkSFtpDir;
    index: Integer): PWideChar; stdcall;

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

Returns True for success, False for failure.

function CkSFtpDir_LoadTaskResult(objHandle: HCkSFtpDir;
    task: HCkTask): wordbool; stdcall;

Introduced in version

Loads the SFTP directory object from a completed asynchronous task.

Returns True for success, False for failure.