Skip to main content
Module

x/denops_std/option/mod.ts>fsync

📚 Standard module for denops.vim
Go to Latest
variable fsync
import { fsync } from "https://deno.land/x/denops_std@v4.1.3/option/mod.ts";

When on, the library function fsync() will be called after writing a file. This will flush a file to disk, ensuring that it is safely written even on filesystems which do metadata-only journaling. This will force the harddrive to spin up on Linux systems running in laptop mode, so it may be undesirable in some situations. Be warned that turning this off increases the chances of data loss after a crash. On systems without an fsync() implementation, this variable is always off. Also see 'swapsync' for controlling fsync() on swap files. 'fsync' also applies to |writefile()| (unless a flag is used to overrule it) and when writing undo files (see |undo-persistence|). This option cannot be set from a |modeline| or in the |sandbox|, for security reasons.

type

{ get(denops: Denops): Promise<boolean>; set(denops: Denops, value: boolean): Promise<void>; reset(denops: Denops): Promise<void>; getGlobal(denops: Denops): Promise<boolean>; setGlobal(denops: Denops, value: boolean): Promise<void>; resetGlobal(denops: Denops): Promise<void>; }