summaryrefslogtreecommitdiff
path: root/cli/js/ops/fs/sync.ts
blob: 5d5de72423d34dccfea28148d1b166fff53e59bd (plain)
1
2
3
4
5
6
7
8
9
10
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { sendSync, sendAsync } from "../dispatch_json.ts";

export function fsyncSync(rid: number): void {
  sendSync("op_fsync", { rid });
}

export async function fsync(rid: number): Promise<void> {
  await sendAsync("op_fsync", { rid });
}