Skip to content
Henryk Wollik edited this page Jul 28, 2014 · 1 revision

Class: FileWatcher

FileWatcher

new FileWatcher()

A basic filewatcher.

Source:

Methods

addFile(path, callbackModfied, callbackAdded, callbackRemoved, callbackNotValid)

Add a file to watch.

Parameters:
Name Type Argument Description
path String

The filepath

callbackModfied function

Callback if watched file is modified

callbackAdded function <optional>

Callback

callbackRemoved function <optional>

Callback if watched file has been removed

callbackNotValid function <optional>

Callback if path isnt valid

Source:

hasFile(path) → {Boolean}

Return if the watcher is currentky watching this file.

Parameters:
Name Type Description
path String

= The file path

Source:
Returns:
Type
Boolean

removeFile(path)

Remove a file from the watcher.

Parameters:
Name Type Description
path String

The file path

Source:

restart()

Restart the watcher if stopped.

Source:

stop()

Stop the watcher.

Source:

Generated with wicked.

Clone this wiki locally