Home Reference Source

Function

Static Public Summary
public

cli()

Runs dum using the current pwd.

public

exists(path: *): *

Whether the file exists.

public

fileKind(filename: *): string

Whether the path is a directory, file, or does not exist.

public

promiseDone(promise: *)

Complains about any errors in a promise.

public

traverseTree(dirPath: *, objectPattern1: {"filter": *, "traverseDir": *, "traverseFile": *}): *

Calls traverseDir on every directory and traverseFile on every file.

Static Public

public cli() source

import cli from 'dum/src/cli.js'

Runs dum using the current pwd.

public exists(path: *): * source

import {exists} from 'dum/src/private/fs-util.js'

Whether the file exists.

Params:

NameTypeAttributeDescription
path *

Return:

*

public fileKind(filename: *): string source

import {fileKind} from 'dum/src/private/fs-util.js'

Whether the path is a directory, file, or does not exist.

Params:

NameTypeAttributeDescription
filename *

Return:

string

public promiseDone(promise: *) source

import {promiseDone} from 'dum/src/private/util.js'

Complains about any errors in a promise. Must call this on any promises not returned from a function.

Params:

NameTypeAttributeDescription
promise *

public traverseTree(dirPath: *, objectPattern1: {"filter": *, "traverseDir": *, "traverseFile": *}): * source

import {traverseTree} from 'dum/src/private/fs-util.js'

Calls traverseDir on every directory and traverseFile on every file. Avoids a file or directory (and all files in it) when filter(path) returns false.

Params:

NameTypeAttributeDescription
dirPath *
objectPattern1 {"filter": *, "traverseDir": *, "traverseFile": *}
  • default: {"filter":null,"traverseDir":null,"traverseFile":null}

Return:

*