Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var Filewatch = module.exports = function(options) {
var self = this;
var plugin = jsDAV_ServerPlugin.extend({
initialize: function(handler) {
jsDAV_ServerPlugin.new(this, handler);
handler.addEventListener("afterWriteContent", function(e, uri) {
self.emit("afterWrite", {
file: "/" + uri
});
e.next();
});
handler.addEventListener("afterDelete", function(e, uri) {
self.emit("afterDelete", {
file: "/" + uri
});
e.next();
var jsDAV_ServerPlugin = require("@pylonide/jsdav/lib/DAV/plugin");
var util = require("util");
var Permission = module.exports = jsDAV_ServerPlugin.extend({
/**
* Plugin name
*
* @var String
*/
name: "permission",
initialize: function(handler) {
jsDAV_ServerPlugin.new(this, handler);
this.handler = handler;
handler.addEventListener("beforeMethod", this.checkPermission.bind(this));
},
READ_METHODS: {
"OPTIONS":1,