Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/rhum/console/deps.ts

A test double library
Go to Latest
import * as rhum from "https://deno.land/x/rhum@v2.1.0/console/deps.ts";

Functions

Copy a file or directory. The directory can have contents. Like cp -r. Requires the --allow-read and --allow-write flag.

Ensures that a directory is empty. Deletes directory contents if the directory is not empty. If the directory does not exist, it is created. The directory itself is not deleted. Requires the --allow-read and --allow-write flag.

Ensures that the directory exists. If the directory structure does not exist, it is created. Like mkdir -p. Requires the --allow-read and --allow-write flag.

Walks the file tree rooted at root, yielding each file or directory in the tree filtered according to the given options. The files are walked in lexical order, which makes the output deterministic but means that for very large directories walk() can be inefficient.