Skip to content

Commit

Permalink
server-node: Added watch method to VFS module abstract
Browse files Browse the repository at this point in the history
  • Loading branch information
andersevenrud committed Nov 24, 2016
1 parent 52edcb3 commit 679acf6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/server/node/modules/vfs/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ function createWriteStream(http, path) {
});
}

/*
* Creates a new filesystem watch
*/
function createWatch(name, mount, callback) {
// Do nothing by default
}

///////////////////////////////////////////////////////////////////////////////
// VFS METHODS
///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -121,6 +128,17 @@ module.exports.createReadStream = createReadStream;
*/
module.exports.createWriteStream = createWriteStream;

/**
* Creates a new filesystem watch
*
* @param {String} name Mountpoint name
* @param {Object} mount Mountpoint options (parsed from config)
* @param {Function} callback Callback function => fn(name, mount, watch)
*
* @return {Promise}
*/
module.exports.createWatch = createWatch;

/*
* The name of your module
*/
Expand Down

0 comments on commit 679acf6

Please sign in to comment.