fs check if dir is dir code example Example: fs check if dir is dir fs.lstatSync(path_string).isDirectory()