Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

node file change event listener

fs.watch('foo', function (event, filename) {
  if (event == 'change') {
    // Load file content
    // Compare to one previously loaded
    // actualContent = newContent
  }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #node #file #change #event #listener
ADD COMMENT
Topic
Name
1+5 =