zen-fs-config 0.3.9 → 0.3.10
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/dist/index.js +3 -2
- package/dist/index.mjs +3 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -349,9 +349,10 @@ async function wrapZenFSFileSystem(config) {
|
|
|
349
349
|
},
|
|
350
350
|
async stat(path, ..._args) {
|
|
351
351
|
const st = await isolatedFS.stat(path);
|
|
352
|
+
const isDir = typeof st.isDirectory === "function" ? st.isDirectory() : st.mode !== void 0 && (st.mode & 61440) === 16384;
|
|
352
353
|
return {
|
|
353
|
-
isFile: () =>
|
|
354
|
-
isDirectory: () =>
|
|
354
|
+
isFile: () => !isDir,
|
|
355
|
+
isDirectory: () => isDir,
|
|
355
356
|
size: st.size,
|
|
356
357
|
mtime: st.mtimeMs ?? st.mtime
|
|
357
358
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -302,9 +302,10 @@ async function wrapZenFSFileSystem(config) {
|
|
|
302
302
|
},
|
|
303
303
|
async stat(path, ..._args) {
|
|
304
304
|
const st = await isolatedFS.stat(path);
|
|
305
|
+
const isDir = typeof st.isDirectory === "function" ? st.isDirectory() : st.mode !== void 0 && (st.mode & 61440) === 16384;
|
|
305
306
|
return {
|
|
306
|
-
isFile: () =>
|
|
307
|
-
isDirectory: () =>
|
|
307
|
+
isFile: () => !isDir,
|
|
308
|
+
isDirectory: () => isDir,
|
|
308
309
|
size: st.size,
|
|
309
310
|
mtime: st.mtimeMs ?? st.mtime
|
|
310
311
|
};
|