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 handle, HCkString retval);

Error information in HTML format for the last method called.

void CkSFtpDir_getLastErrorText(HCkSFtpDir handle, HCkString retval);

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

void CkSFtpDir_getLastErrorXml(HCkSFtpDir handle, HCkString retval);

Error information in XML format for the last method called.

int CkSFtpDir_getNumFilesAndDirs(HCkSFtpDir handle);

The number of entries in this directory listing.

void CkSFtpDir_getOriginalPath(HCkSFtpDir handle, 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 handle);
void CkSFtpDir_putUtf8(HCkSFtpDir handle, BOOL newVal);

To be documented soon...

C "Methods"

HCkSFtpFile CkSFtpDir_GetFileObject(HCkSFtpDir handle, int index);

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

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

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

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

Saves the last error information to an XML formatted file.

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

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

const char *CkSFtpDir_lastErrorHtml(HCkSFtpDir handle);

Error information in HTML format for the last method called.

const char *CkSFtpDir_lastErrorText(HCkSFtpDir handle);

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

const char *CkSFtpDir_lastErrorXml(HCkSFtpDir handle);

Error information in XML format for the last method called.

const char *CkSFtpDir_originalPath(HCkSFtpDir handle);

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.