chushihua
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function (fileSystem, filename) {
|
||||
var exists = false;
|
||||
|
||||
try {
|
||||
exists = fileSystem.statSync(filename).isFile();
|
||||
} catch (err) {
|
||||
if (err.code !== "ENOENT") throw err;
|
||||
}
|
||||
|
||||
return exists;
|
||||
};
|
||||
Reference in New Issue
Block a user