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

x/ddc_vim/deps.ts>fn.rename

Dark deno-powered completion framework for neovim/Vim
Go to Latest
function fn.rename
import { fn } from "https://deno.land/x/ddc_vim@v4.1.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>