Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ddc_vim/deps.ts>fn.getftype

Dark deno-powered completion framework for neovim/Vim
Go to Latest
function fn.getftype
import { fn } from "https://deno.land/x/ddc_vim@v4.1.0/deps.ts";
const { getftype } = fn;

The result is a String, which is a description of the kind of file of the given file {fname}. If {fname} does not exist an empty string is returned. Here is a table over different kinds of files and their results: Normal file "file" Directory "dir" Symbolic link "link" Block device "bdev" Character device "cdev" Socket "socket" FIFO "fifo" All other "other" Example:

getftype("/home")

Note that a type such as "link" will only be returned on systems that support it. On some systems only "dir" and "file" are returned. On MS-Windows a symbolic link to a directory returns "dir" instead of "link".

Can also be used as a method:

GetFilename()->getftype()

Parameters

denops: Denops
fname: unknown

Returns

Promise<string>