Function S_ISDIR (m:integer) : boolean;
S_ISDIR checks the file mode m to see whether the file is a directory. If so it returns True
FStat, S_ISLNK, S_ISREG, S_ISCHR, S_ISBLK, S_ISFIFO, S_ISSOCK
For an example, see ISLNK.