Back to product page

ListItems callback


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

Syntax

  • C
void (*ListItems)(void *Sftp, char *FileInfo);
The ListItems(void *Sftp,char *FileInfo) syntax has these parts:
void *SftpHandle of the created Sftp instance.
char *FileInfoHolds 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.

Platforms

Windows