Skip to main content
FileHandle.datasync - node__fs--promises.d.ts - Node documentation
method FileHandle.datasync

Usage in Deno

```typescript import { type FileHandle } from "node:node__fs--promises.d.ts"; ```
FileHandle.datasync(): Promise<void>
Forces all currently queued I/O operations associated with the file to the operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. Unlike `filehandle.sync` this method does not flush modified metadata.

Return Type

Promise<void>
Fulfills with `undefined` upon success.