SFtpDir Delphi DLL Reference Documentation

SFtpDir

Represents a remote SFTP directory listing.

Create/Dispose

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.

Properties

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.

Methods

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 9.5.0.52

Loads the SFTP directory object from a completed asynchronous task.

Returns True for success, False for failure.