Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/denops_std/function/vim/mod.ts>isabsolutepath

๐Ÿ“š Standard module for denops.vim
Go to Latest
function isabsolutepath
import { isabsolutepath } from "https://deno.land/x/denops_std@v6.3.0/function/vim/mod.ts";

The result is a Number, which is TRUE when {path} is an absolute path. On Unix, a path is considered absolute when it starts with '/'. On MS-Windows, it is considered absolute when it starts with an optional drive prefix and is followed by a '' or '/'. UNC paths are always absolute. Example:

echo isabsolutepath('/usr/share/')      " 1
echo isabsolutepath('./foobar')         " 0
echo isabsolutepath('C:\Windows')       " 1
echo isabsolutepath('foobar')           " 0
echo isabsolutepath('\\remote\file')    " 1

Can also be used as a method:

GetName()->isabsolutepath()

Parameters

denops: Denops
path: unknown

Returns

Promise<number>