MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / stat

Function stat

src/lib/libnoderawfs.js:91–99  ·  view source on GitHub ↗
(path, dontFollow)

Source from the content-addressed store, hash-verified

89 unlink(...args) { fs.unlinkSync(...args); },
90 readlink(...args) { return fs.readlinkSync(...args); },
91 stat(path, dontFollow) {
92 var stat = dontFollow ? fs.lstatSync(path) : fs.statSync(path);
93 if (NODEFS.isWindows) {
94 // Windows does not report the 'x' permission bit, so propagate read
95 // bits to execute bits.
96 stat.mode |= (stat.mode & {{{ cDefs.S_IRUGO }}}) >> 2;
97 }
98 return stat;
99 },
100 fstat(fd) {
101 var stream = FS.getStreamChecked(fd);
102 return fs.fstatSync(stream.nfd);

Callers 1

libnodefs.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected