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

Function fsyncSync

lib/fs.js:1559–1570  ·  view source on GitHub ↗

* Synchronously requests for all data for the open * file descriptor to be flushed to the storage device. * @param {number} fd * @returns {void}

(fd)

Source from the content-addressed store, hash-verified

1557 * @returns {void}
1558 */
1559function fsyncSync(fd) {
1560 const h = vfsState.handlers;
1561 if (h !== null) {
1562 const result = h.fsyncSync(fd);
1563 if (result !== undefined) return;
1564 }
1565
1566 if (permission.isEnabled()) {
1567 throw new ERR_ACCESS_DENIED('fsync API is disabled when Permission Model is enabled.');
1568 }
1569 binding.fsync(fd);
1570}
1571
1572/**
1573 * Asynchronously creates a directory.

Callers

nothing calls this directly

Calls 2

isEnabledMethod · 0.80
fsyncMethod · 0.80

Tested by

no test coverage detected