Skip to main content
Module

x/denops_std/function/mod.ts>swapinfo

📚 Standard module for denops.vim
Go to Latest
function swapinfo
import { swapinfo } from "https://deno.land/x/denops_std@v6.4.0/function/mod.ts";

The result is a dictionary, which holds information about the swapfile {fname}. The available fields are: version Vim version user user name host host name fname original file name pid PID of the Vim process that created the swap file mtime last modification time in seconds inode Optional: INODE number of the file dirty 1 if file was modified, 0 if not Note that "user" and "host" are truncated to at most 39 bytes. In case of failure an "error" item is added with the reason: Cannot open file: file not found or in accessible Cannot read file: cannot read first block Not a swap file: does not contain correct block ID Magic number mismatch: Info in first block is invalid

Can also be used as a method:

GetFilename()->swapinfo()

Parameters

denops: Denops
fname: unknown

Returns

Promise<Record<string, unknown>>