Module: siteKiosk.siteRemote.fileSync

This module allows to listen to the file sync component of SiteRemote in order to be notified when those files are modified.

Example

// simply log when a file has changed
siteKiosk.siteRemote.fileSync.addOnChangeListener(function() {
    console.log("Oh, a file has changed!");
});

Methods

<static> addOnChangeListener(listener) → {siteKiosk.siteRemote.fileSync~eventSubscription}

Registers a listener, which will be invoked, when a file has been synced.
Parameters:
Name Type Description
listener siteKiosk.siteRemote.fileSync~onChangeListener A listener to be invoked, when a file has been synced
Returns:
An event subscription
Type
siteKiosk.siteRemote.fileSync~eventSubscription

Type Definitions

eventSubscription

An event subscription.
Type:
  • Object
Properties:
Name Type Description
unbind function Unsubscribes the event

onChangeListener()

This listener will be invoked, when a file has been synced.