dir-output
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

dir-output

An interface for managing a dir.

dir-output~DirOutput

DirOutput class

Kind: inner class of dir-output

new DirOutput(outputPath)

Param Description
outputPath The path to the dir.

dirOutput.remove(file) ⇒ Promise

Remove a file or recursively remove a dir. Returns true if file was deleted, and false if file did not exist.

Kind: instance method of DirOutput
Fulfil: boolean

Param Type Description
file string The name of the dir.

dirOutput.createDir(name, empty) ⇒ Promise

Creates a dir. If this dir was scheduled to be deleted by a empty operation, this dir is not deleted. Returns a DirOutput with the outputPath being the path of the dir that was created.

Kind: instance method of DirOutput
Fulfil: DirOutput

Param Type Default Description
name string The name of the dir.
empty boolean true Whether or not to empty the dir if it was preserved instead of deleted.

dirOutput.empty() ⇒ Promise

Remove all files and dirs in the output dir.

Kind: instance method of DirOutput
Fulfil: void

Readme

Keywords

none

Package Sidebar

Install

npm i dir-output

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

29.8 kB

Total Files

9

Last publish

Collaborators

  • programmerraj