SFtpDir Unicode C Reference Documentation


Represents a remote SFTP directory listing.


HCkSFtpDirW CkSFtpDirW_Create(void);

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

void CkSFtpDirW_Dispose(HCkSFtpDirW handle);

Objects created by calling CkSFtpDirW_Create must be freed by calling this method. A memory leak occurs if a handle is not disposed by calling this function. Also, any handle returned by a Chilkat "C" function must also be freed by the application by calling the appropriate Dispose method, such as CkSFtpDirW_Dispose.


int CkSFtpDirW_getNumFilesAndDirs(HCkSFtpDirW cHandle);

The number of entries in this directory listing.

void CkSFtpDirW_getOriginalPath(HCkSFtpDirW cHandle, HCkString retval);

const wchar_t *CkSFtpDirW_originalPath(HCkSFtpDirW cHandle);

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.


HCkSFtpFileW CkSFtpDirW_GetFileObject(HCkSFtpDirW cHandle, int index);

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

BOOL CkSFtpDirW_GetFilename(HCkSFtpDirW cHandle, int index, HCkString outStr);

const wchar_t *CkSFtpDirW_getFilename(HCkSFtpDirW cHandle, int index);

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

Returns TRUE for success, FALSE for failure.

BOOL CkSFtpDirW_LoadTaskResult(HCkSFtpDirW cHandle, HCkTaskW task);

Introduced in version

Loads the SFTP directory object from a completed asynchronous task.

Returns TRUE for success, FALSE for failure.