Skip to main content
Module

x/fs_cli/deps.ts

A deno tool to handle directories and files through script: delete directories or files, copy simple or recursive, etc. Inspired by rimraf and mkdirp
Latest
import * as mod from "https://deno.land/x/fs_cli@v1.0.0/deps.ts";

Functions

Make an assertion, error will be thrown if expr does not have truthy value.

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.

Test whether or not the given path exists by checking with the file system

Returns the numeric log level associated with the passed, stringy log level name.

Get a logger instance. If not specified name, get the default logger.

Convert a glob string to a regular expression.

Test whether the given string is a glob

Setup logger config.

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.

Interfaces

Command option options.