22
edits
No edit summary |
(→API) |
||
Line 37: | Line 37: | ||
// Create a watcher which will call the callback function every time files are updated | // Create a watcher which will call the callback function every time files are updated | ||
// callback will take the DeviceStorage, the file's name, and the update type, which will be one of "created", "deleted", or "modified" | // callback will take the DeviceStorage, the file's name, and the update type, which will be one of "created", "deleted", or "modified" | ||
boolean addFileWatcher(Function callback); | // If name is passed, the file watcher will only watch the file with the specified name. | ||
boolean addFileWatcher(Function callback, optional DOMstring name); | |||
// returns true if there was a watcher with this id, and false otherwise. | // returns true if there was a watcher with this id, and false otherwise. | ||
boolean removeFileWatcher(Function callback); | boolean removeFileWatcher(Function callback, optional DOMstring name); | ||
// See interface below for how to use this | // See interface below for how to use this |
edits