import { move } from "https://deno.land/std@0.222.1/fs/mod.ts";
Asynchronously moves a file or directory.
Examples
Basic usage
Basic usage
import { move } from "https://deno.land/std@0.222.1/fs/move.ts";
await move("./foo", "./bar");
This will move the file or directory at ./foo
to ./bar
without
overwriting.
Overwriting
Overwriting
import { move } from "https://deno.land/std@0.222.1/fs/move.ts";
await move("./foo", "./bar", { overwrite: true });
This will move the file or directory at ./foo
to ./bar
, overwriting
./bar
if it already exists.