ReadDirEntry Function

Reads the current directory entry as a local filename, then moves to the next file.

bool ReadDirEntry(Handle dir, char[] buffer, int maxlength, FileType& type)

Parameters

Handle dir

Handle to a directory.

char[] buffer

String buffer to hold directory name.

int maxlength

Maximum size of string buffer.

FileType& type

Optional variable to store the file type.

Return Value

True on success, false if there are no more files to read.

Errors

Invalid or corrupt Handle.

Notes

Contents of buffers are undefined when returning false.

Both the '.' and '..' automatic directory entries will be retrieved for Windows and Linux.