FS Sprawdź, czy Dir to Dir

fs.lstatSync(path_string).isDirectory() 
florinrelea