Function TellDir (p:pdir) : longint;
TellDir returns the current location in the directory structure pointed to by p. It returns -1 on failure.
Errors are returned in LinuxError.
CloseDir, ReadDir, SeekDir, OpenDir, telldir (3)
For an example, see OpenDir.