xxoo/node-fswin

dirWatcher options are invalid

Closed this issue · 2 comments

fswin.dirWatcher.options duplicates fswin.dirWatcher.events:

image

I copy-pasted the example code from this docs section, and it has issues related with the problem i described before:

image

Tip: To temporary fix this you can change options object structure like this:

const options = {
  WATCH_SUB_DIRECTORIES: true,  // watch the directory tree
  CHANGE_FILE_SIZE:      true,  // watch file size changes, will fire in 'MODIFIED' event
  CHANGE_LAST_WRITE:     true,  // watch last write time changes, will fire in 'MODIFIED' event
  CHANGE_LAST_ACCESS:    false, // watch last access time changes, will fire in 'MODIFIED' event
  CHANGE_CREATION:       false, // watch creation time changes, will fire in 'MODIFIED' event
  CHANGE_ATTRIBUTES:     false, // watch attributes changes, will fire in 'MODIFIED' event
  CHANGE_SECURITY:       false  // watch security changes, will fire in 'MODIFIED' event;
};

P.S. Thanks for awesome lib

xxoo commented

thanks for using fswin. i'm currently rewriting it with n-api, and considering removing these properties. since people don't really use them.

xxoo commented

document fixed.