Spec-Zone.ru › Deno 1

Deno.fdatasync

Очищает все ожидающие операции с данными данного потока файла на диске.

const file = await Deno.open(
 "my_file.txt",
 { read: true, write: true, create: true },
);
await Deno.write(file.rid, new TextEncoder().encode("Hello World"));
await Deno.fdatasync(file.rid);
console.log(new TextDecoder().decode(await Deno.readFile("my_file.txt"))); // Hello World
function fdatasync(rid: number): Promise<void>;
fdatasync(rid: number): Promise<void>

Параметры

rid: number

Тип возвращаемого значения

Promise<void>

© 2018–2022 the Deno authors
https://doc.deno.land/deno/stable/~/Deno.fdatasync

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API