1.1.0 • Published 3 years ago

dir-output v1.1.0

Weekly downloads
5
License
MIT
Repository
github
Last release
3 years ago

dir-output

An interface for managing a dir.

dir-output~DirOutput

DirOutput class

Kind: inner class of dir-output

new DirOutput(outputPath)

ParamDescription
outputPathThe 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

ParamTypeDescription
filestringThe 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

ParamTypeDefaultDescription
namestringThe name of the dir.
emptybooleantrueWhether 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