* 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)
| 1493 | * @returns {void} |
| 1494 | */ |
| 1495 | function 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 |
nothing calls this directly
no test coverage detected
searching dependent graphs…