Skip to main content
Module

x/denops_std/function/mod.ts>filereadable

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

The result is a Number, which is |TRUE| when a file with the name {file} exists, and can be read. If {file} doesn't exist, or is a directory, the result is |FALSE|. {file} is any expression, which is used as a String. If you don't care about the file being readable you can use |glob()|. {file} is used as-is, you may want to expand wildcards first: echo filereadable('/.vimrc') 0 echo filereadable(expand('/.vimrc')) 1 Can also be used as a |method|: GetName()->filereadable() Obsolete name: file_readable().

Parameters

denops: Denops
file: unknown

Returns

Promise<unknown>