Created
September 5, 2012 20:34
-
-
Save bluesmoon/3644290 to your computer and use it in GitHub Desktop.
only first of multiple fs.FSWatchers will fire on a directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs') | |
fs.watch("./", function(event, filename) { console.log(1, event, filename); }); | |
fs.watch("./", function(event, filename) { console.log(2, event, filename); }); | |
fs.watch("./", function(event, filename) { console.log(3, event, filename); }); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Creating" | |
touch foo | |
echo "Renaming" | |
mv foo bar | |
echo "Removing" | |
rm bar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 'rename' 'foo' | |
1 'change' 'foo' | |
1 'rename' 'foo' | |
1 'rename' 'bar' | |
1 'rename' 'bar' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 'rename' 'foo' | |
2 'rename' 'foo' | |
3 'rename' 'foo' | |
1 'change' 'foo' | |
2 'change' 'foo' | |
3 'change' 'foo' | |
1 'rename' 'foo' | |
2 'rename' 'foo' | |
3 'rename' 'foo' | |
1 'rename' 'bar' | |
2 'rename' 'bar' | |
3 'rename' 'bar' | |
1 'rename' 'bar' | |
2 'rename' 'bar' | |
3 'rename' 'bar' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment