* Synchronously requests for all data for the open * file descriptor to be flushed to the storage device. * @param {number} fd * @returns {void}
(fd)
| 1557 | * @returns {void} |
| 1558 | */ |
| 1559 | function 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. |