SysDirRead (FUN)
FUNCTION SysDirRead : RTS_IEC_RESULT
Read next directory entry. Writes the entry in pszDirEntry.
- InOut:
Scope
Name
Type
Comment
Return
SysDirReadRTS_IEC_RESULTReturns the runtime system error code (see CmpErrors.library)
ERR_OK: Entry could be read
ERR_END_OF_OBJECT: If end of directory list was reached
ERR_PARAMETER: If one of the parameters is invalid
ERR_BUFFERSIZE: If iMaxDirEntry is too short to get the complete directory entry string
Note
Typically after error
ERR_BUFFERSIZE, the dir-handle is set to the next entry, so this entry will be missed!Input
hDirRTS_IEC_HANDLEHandle to directory opened with SysDirOpen
Inout
szDirEntrySTRINGOUT_PARAMETER: Directory entry as string
Input
diMaxDirEntryDINTOUT_PARAMETER: Max number of bytes to write in pszDirEntry
pDirInfoPOINTER TO DirInfo
OUT_PARAMETER: Directory information NOTE: Can be 0 (so only directory name is provided in pszDirEntry)