wodSFTP API library - ListItems Callback
    
 

Description

Called when the server returns information about a file or directory.


Syntax

void (*ListItems)(void *Sftp, char *FileInfo);

The ListItems callback syntax has these parts:

Part Description
void *Sftp Handle of the created Sftp instance.
char *FileInfo Holds the server's results for your request.

Remarks

The ListItems callback will be called as a result of the ListDir , ListNames, RealPath , and GetAttributes methods. The FileInfo argument will contain:

1. For ListDir and ListNames there will be a complete description of all files in the requested directory, as seen on UNIX systems. Each file will be on a separate line, using CRLF sequence as a separator

2. For RealPath the argument will contain the full path to a file/directory pointed to by the requested symbolic link.

3. For GetAttributes the argument will contain a text description for the requested file/directory attributes.

Calling ListDir and ListNames can cause this callback to be invoked more than once before the Done callback defines method completion. This will happen if the remote directory contains many files.

NOTE: this callback is called only if you have created an instance of the SftpEventsStruct structure, and set its ListItems member to the function implementing it.