dir-output
An interface for managing a dir.
- dir-output
- ~DirOutput
- new DirOutput(outputPath)
- .remove(file) ⇒
Promise
- .createDir(name, empty) ⇒
Promise
- .empty() ⇒
Promise
- ~DirOutput
dir-output~DirOutput
DirOutput class
Kind: inner class of dir-output
- ~DirOutput
- new DirOutput(outputPath)
- .remove(file) ⇒
Promise
- .createDir(name, empty) ⇒
Promise
- .empty() ⇒
Promise
new DirOutput(outputPath)
Param | Description |
---|---|
outputPath | The path to the dir. |
Promise
dirOutput.remove(file) ⇒ 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. |
Promise
dirOutput.createDir(name, empty) ⇒ 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. |
Promise
dirOutput.empty() ⇒ Remove all files and dirs in the output dir.
Kind: instance method of DirOutput
Fulfil: void