pinokiod 3.9.15 → 3.9.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kernel/loader.js +8 -2
- package/package.json +1 -1
package/kernel/loader.js
CHANGED
|
@@ -94,8 +94,14 @@ class Loader {
|
|
|
94
94
|
})
|
|
95
95
|
return result
|
|
96
96
|
}
|
|
97
|
-
exists(abspath) {
|
|
98
|
-
|
|
97
|
+
async exists(abspath) {
|
|
98
|
+
try {
|
|
99
|
+
await fs.promises.stat(abspath);
|
|
100
|
+
return true;
|
|
101
|
+
} catch (e) {
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
//return new Promise(r=>fs.access(abspath, fs.constants.F_OK, e => r(!e)))
|
|
99
105
|
}
|
|
100
106
|
}
|
|
101
107
|
module.exports = Loader
|