SfileAPI

Implements the Sfile Api for module script.

sfile.value ⇒ *

Accessor property that returns current value from client cache.

sfile.post(value)

ParamDescription
value

input to the SInterface save() script

Sends async request to server to update SFile value. The server runs the “save” method of the SInterface script to set the new value and then sends a push to any listening clients.

sfile.onUpdate(user_callback)

ParamType
user_callbackfunction

Register a callback to handle the server push which will be made whenver the SFile value is updated.