2012-01-12 68 views

回答

2
fs = require('fs');   
fs.exists(path, function(exists) {   
    console.log((exists ? "File is there" : "File is not there"));   
}); 
+1

fs = require('fs'); console.log(fs.statSync(path).isFile()); // 對或錯 – 2013-05-27 14:08:14

相關問題