Box Class
Description
This module is used to manage files and processors.
Constructor
Box
(base, [options])Methods
_dispatch
(type, path, [callback]) async private_loadFileList
(callback) async privateaddProcessor
(pattern, fn)Adds a processor to the box.
Parameters
-
pattern
RegExp | String
The path pattern of the processor. See Box.Pattern for more info.
-
fn
Function
The processor function.
process
([files], [callback]) asyncunwatch
Stops watching.
watch
Starts watching.
Properties
Box.Pattern
staticSee Box.Pattern
base
Base path.
isProcessing
privateIndicates if the box is processing.
processingFiles
privateProcessing files.
processors
Processor collection.
watcher
A instance of watcher.