Skip to main content
Module

x/ddc_vim/deps.ts>fn.filereadable

Dark deno-powered completion framework for neovim/Vim8
Go to Latest
function fn.filereadable
import { fn } from "https://deno.land/x/ddc_vim@v2.3.0/deps.ts";
const { filereadable } = fn;

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>