MCPcopy Create free account
hub / github.com/GoogleChrome/samples / writeStat

Function writeStat

sqlite-wasm-cos/sqlite3-node.mjs:3092–3113  ·  view source on GitHub ↗
(buf, stat)

Source from the content-addressed store, hash-verified

3090 return dir + '/' + path;
3091 },
3092 writeStat(buf, stat) {
3093 HEAPU32[((buf)>>2)] = stat.dev;
3094 HEAPU32[(((buf)+(4))>>2)] = stat.mode;
3095 HEAPU32[(((buf)+(8))>>2)] = stat.nlink;
3096 HEAPU32[(((buf)+(12))>>2)] = stat.uid;
3097 HEAPU32[(((buf)+(16))>>2)] = stat.gid;
3098 HEAPU32[(((buf)+(20))>>2)] = stat.rdev;
3099 HEAP64[(((buf)+(24))>>3)] = BigInt(stat.size);
3100 HEAP32[(((buf)+(32))>>2)] = 4096;
3101 HEAP32[(((buf)+(36))>>2)] = stat.blocks;
3102 var atime = stat.atime.getTime();
3103 var mtime = stat.mtime.getTime();
3104 var ctime = stat.ctime.getTime();
3105 HEAP64[(((buf)+(40))>>3)] = BigInt(Math.floor(atime / 1000));
3106 HEAPU32[(((buf)+(48))>>2)] = (atime % 1000) * 1000 * 1000;
3107 HEAP64[(((buf)+(56))>>3)] = BigInt(Math.floor(mtime / 1000));
3108 HEAPU32[(((buf)+(64))>>2)] = (mtime % 1000) * 1000 * 1000;
3109 HEAP64[(((buf)+(72))>>3)] = BigInt(Math.floor(ctime / 1000));
3110 HEAPU32[(((buf)+(80))>>2)] = (ctime % 1000) * 1000 * 1000;
3111 HEAP64[(((buf)+(88))>>3)] = BigInt(stat.ino);
3112 return 0;
3113 },
3114 writeStatFs(buf, stats) {
3115 HEAPU32[(((buf)+(4))>>2)] = stats.bsize;
3116 HEAPU32[(((buf)+(60))>>2)] = stats.bsize;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected