Special characters in node.js readdir()
问题 I'm running this piece of code in node.js in order to see the files in a directory an to see the stats for them: var getFiles = function (dir, done) { fs.readdir(dir, function (err, files) { if (err) return done(err); var pending = files.length; files.forEach(function (file) { fullPath = dir + "/" + file; console.log(fullPath); fs.stat(fullPath, function (err, stat) { if (err) { console.log("Stat error"); } else if (stat && stat != undefined) { console.log("Success"); } }); }); }); } My