Skip to content

Instantly share code, notes, and snippets.

@indyfromoz
Created December 25, 2013 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save indyfromoz/8120584 to your computer and use it in GitHub Desktop.
Save indyfromoz/8120584 to your computer and use it in GitHub Desktop.
Watches a file for any changes
fs.watch('any-folder-you-want', function (event, filename) {
console.log('event: ' + event);
if (filename) {
console.log('filename: ' + filename);
} else {
console.log('filename unknown');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment