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

x/deno/cli/js/deno.ts>removeSync

A modern runtime for JavaScript and TypeScript.
Go to Latest
function removeSync
import { removeSync } from "https://deno.land/x/deno@v0.28.0/cli/js/deno.ts";

Removes the named file or directory synchronously. Would throw error if permission denied, not found, or directory not empty if recursive set to false. recursive is set to false by default.

  Deno.removeSync("/path/to/dir/or/file", {recursive: false});

Parameters

path: string
optional
options: RemoveOption = [UNSUPPORTED]