API Reference

Box Class

Defined in lib/box/index.js:16
Extends EventEmitter

Description

This module is used to manage files and processors.

Constructor

Box

(base, [options])
Defined in lib/box/index.js:16

This module is used to manage files and processors.

Parameters

Methods

_dispatch

(type, path, [callback]) async private

Dispatches files to processors.

Parameters

  • type String

    Available types: create, update, delete

  • path String

    File path

  • callback Function optional

_loadFileList

(callback) async private

Loads file list and checks their modified date.

Parameters

addProcessor

(pattern, fn)
Defined in lib/box/index.js:86

Adds a processor to the box.

Parameters

process

([files], [callback]) async

Loads all files and runs processors.

Parameters

unwatch

Stops watching.

watch

Starts watching.

Properties

Box.File

static

See Box.File

base

Defined in lib/box/index.js:31

Base path.

isProcessing

private
Defined in lib/box/index.js:64

Indicates if the box is processing.

processingFiles

private
Defined in lib/box/index.js:47

Processing files.

processors

Defined in lib/box/index.js:39

Processor collection.

watcher

Defined in lib/box/index.js:56

A instance of watcher.