Function ReadDir (p:pdir) : pdirent;
ReadDir reads the next entry in the directory pointed to by p. It returns a pdirent pointer to a structure describing the entry. If the next entry can't be read, Nil is returned.
Errors are returned in LinuxError.
CloseDir, OpenDir, SeekDir, TellDir, readdir (3)
For an example, see OpenDir.