MCPcopy Index your code
hub / github.com/nodejs/node / fsync

Function fsync

test/parallel/test-trace-events-fs-async.js:97–104  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

95}
96
97function fsync() {
98 const fs = require('fs');
99 fs.writeFileSync('fs9.txt', '123', 'utf8');
100 const fd = fs.openSync('fs9.txt', 'r+');
101 fs.fsync(fd, () => {
102 fs.unlinkSync('fs9.txt');
103 });
104}
105
106function ftruncate() {
107 const fs = require('fs');

Callers

nothing calls this directly

Calls 5

fsyncMethod · 0.80
requireFunction · 0.50
writeFileSyncMethod · 0.45
openSyncMethod · 0.45
unlinkSyncMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…