Skip to main content
Module

x/denops_std/function/mod.ts>getftype

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

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>