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

Function fdatasync

lib/fs.js:1495–1509  ·  view source on GitHub ↗

* Forces all currently queued I/O operations associated * with the file to the operating system's synchronized * I/O completion state. * @param {number} fd * @param {(err?: Error) => any} callback * @returns {void}

(fd, callback)

Source from the content-addressed store, hash-verified

1493 * @returns {void}
1494 */
1495function fdatasync(fd, callback) {
1496 callback = makeCallback(callback);
1497
1498 const h = vfsState.handlers;
1499 if (h !== null && vfsVoid(h.fdatasync(fd), callback)) return;
1500
1501 const req = new FSReqCallback();
1502 req.oncomplete = callback;
1503
1504 if (permission.isEnabled()) {
1505 callback(new ERR_ACCESS_DENIED('fdatasync API is disabled when Permission Model is enabled.'));
1506 return;
1507 }
1508 binding.fdatasync(fd, req);
1509}
1510
1511/**
1512 * Synchronously forces all currently queued I/O operations

Callers

nothing calls this directly

Calls 4

vfsVoidFunction · 0.85
isEnabledMethod · 0.80
makeCallbackFunction · 0.70
callbackFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…