Skip to main content
Module

x/dpp_vim/deps.ts>fn.filereadable

Dark powered plugin manager for Vim/neovim
Latest
function fn.filereadable
import { fn } from "https://deno.land/x/dpp_vim@v0.2.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<number>