FS verifique si DIR es DIR

fs.lstatSync(path_string).isDirectory() 
florinrelea