Skip to main content
Module

x/dpp_vim/deps.ts>fn.rename

Dark powered plugin manager for Vim/neovim
Latest
function fn.rename
import { fn } from "https://deno.land/x/dpp_vim@v0.2.0/deps.ts";
const { rename } = fn;

Rename the file by the name {from} to the name {to}. This should also work to move files across file systems. The result is a Number, which is 0 if the file was renamed successfully, and non-zero when the renaming failed. NOTE: If {to} exists it is overwritten without warning. This function is not available in the sandbox.

Can also be used as a method:

GetOldName()->rename(newname)

Parameters

denops: Denops
from: unknown
to: unknown

Returns

Promise<number>