Function CloseDir (p:pdir) : integer;
CloseDir closes the directory pointed to by p. It returns zero if the directory was closed succesfully, -1 otherwise.
Errors are returned in LinuxError.
OpenDir, ReadDir, SeekDir, TellDir, closedir (3)
For an example, see OpenDir.