import { remove } from "https://deno.land/x/ayonli_jsext@v0.9.72/fs.ts";
Removes the file or directory of the given path from the file system.
Examples
Example 1
Example 1
// with the default storage
import { remove } from "@ayonli/jsext/fs";
await remove("/path/to/file.txt");
Example 2
Example 2
// with a user-selected directory as root (Chromium only)
import { remove } from "@ayonli/jsext/fs";
const root = await window.showDirectoryPicker();
await remove("/path/to/file.txt", { root });
Example 3
Example 3
// remove the directory and its contents recursively
import { remove } from "@ayonli/jsext/fs";
await remove("/path/to/dir", { recursive: true });
Parameters
optional
options: RemoveOptions = [UNSUPPORTED]