Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/denops_std/function/mod.ts>filewritable

๐Ÿ“š Standard module for denops.vim
Go to Latest
function filewritable
import { filewritable } from "https://deno.land/x/denops_std@v5.0.2/function/mod.ts";

The result is a Number, which is 1 when a file with the name {file} exists, and can be written. If {file} doesn't exist, or is not writable, the result is 0. If {file} is a directory, and we can write to it, the result is 2.

Can also be used as a method:

GetName()->filewritable()

Parameters

denops: Denops
file: unknown

Returns

Promise<number>