SFtpDir C Library Reference

SFtpDir

Represents a remote SFTP directory listing.

Create/Dispose

HCkSFtpDir CkSFtpDir_Create(void);

Creates an instance of the CkSFtpDir 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 CkSFtpDir_Dispose(HCkSFtpDir handle);

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.

C "Properties"

void CkSFtpDir_getLastErrorHtml(HCkSFtpDir cHandle, HCkString retval);

Error information in HTML format for the last method called.

void CkSFtpDir_getLastErrorText(HCkSFtpDir cHandle, HCkString retval);

Error information in plain-text format for the last method called.

void CkSFtpDir_getLastErrorXml(HCkSFtpDir cHandle, HCkString retval);

Error information in XML format for the last method called.

int CkSFtpDir_getNumFilesAndDirs(HCkSFtpDir cHandle);

The number of entries in this directory listing.

void CkSFtpDir_getOriginalPath(HCkSFtpDir cHandle, HCkString retval);

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.

BOOL CkSFtpDir_getUtf8(HCkSFtpDir cHandle);
void CkSFtpDir_putUtf8(HCkSFtpDir cHandle, BOOL newVal);

To be documented soon...

C "Methods"

HCkSFtpFile CkSFtpDir_GetFileObject(HCkSFtpDir cHandle, int index);

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

BOOL CkSFtpDir_GetFilename(HCkSFtpDir cHandle, int index, HCkString outStr);

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

BOOL CkSFtpDir_SaveLastError(HCkSFtpDir cHandle, const char *filename);

Saves the last error information to an XML formatted file.

const char *CkSFtpDir_getFilename(HCkSFtpDir cHandle, int index);

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

Returns a null on failure

const char *CkSFtpDir_lastErrorHtml(HCkSFtpDir cHandle);

Error information in HTML format for the last method called.

Returns a null on failure

const char *CkSFtpDir_lastErrorText(HCkSFtpDir cHandle);

Error information in plain-text format for the last method called.

Returns a null on failure

const char *CkSFtpDir_lastErrorXml(HCkSFtpDir cHandle);

Error information in XML format for the last method called.

Returns a null on failure

const char *CkSFtpDir_originalPath(HCkSFtpDir 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.

Returns a null on failure