A file can be one of the following types in #Linux 1) regular/plain file 2) device 3) pipe 4) socket 5) directory 6) symbolic link Speaking of which I remember fs.Stats providing synchronous functions for checking the type of a file in node.js

 — @scriptnull