Skip to main content
Module

x/denops_std/function/mod.ts>delete_

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

Without {flags} or with {flags} empty: Deletes the file by the name {fname}. This also works when {fname} is a symbolic link. The symbolic link itself is deleted, not what it points to. When {flags} is "d": Deletes the directory by the name {fname}. This fails when directory {fname} is not empty. When {flags} is "rf": Deletes the directory by the name {fname} and everything in it, recursively. BE CAREFUL! Note: on MS-Windows it is not possible to delete a directory that is being used. The result is a Number, which is 0/false if the delete operation was successful and -1/true when the deletion failed or partly failed. Use |remove()| to delete an item from a |List|. To delete a line from the buffer use |:delete| or |deletebufline()|. Can also be used as a |method|: GetName()->delete()

Parameters

denops: Denops
fname: unknown
optional
flags: unknown

Returns

Promise<unknown>