deno delete directory code example
Example 1: delete folder with deno
// delete empty folder
await Deno.remove("./some_dir");
// delete non-empty folder
await Deno.remove("./some_dir", { recursive: true });
// delete empty folder sync
Deno.removeSync("./some_dir");
// delete non-empty folder sync
Deno.removeSync("./some_dir", { recursive: true });
Example 2: delete file with deno
// async
await Deno.remove("./file.txt");
// sync
Deno.removeSync("./file.txt");