SysDirRead

This function of type UDINT can be used to read directory entries.

Each time the function is called, one entry of the directory will be read. As long as “1” is returned, a further entry is in the directory. Thus for reading all entries the function must be called repeatedly until “0” is returned. In this case, the directory is closed and the handle is not valid any more. In every case, the function has to be called until it returns 0 to close the directory.

The information on the particular entries will be written to structure DIRECTORY_INFO.

Input-Variable Data type Description
hDir DWORD Handle of the directory; Returned by function SysDirOpen, which was called before for opening the directory.
stDirEntry STRING Name of an entry in the directory. Can be a file or another directory. Max. 80 characters.
pDirInfo POINTER TO Structure DIRECTORY_INFO Pointer on structure DIRECTORY_INFO, which will be filled with information on the read entry. You can enter “0” here if the information should not be read.