I'm using chokidar, and I think it is the best 'FS.Watcher' implementation I've used! ;)
very good job!
So, playing with my filesystem I see an odd behavior.
I'm watching a folder, creating a new folder no 'added' event is fired. Creating an empty file in the new folder the 'added' event is fired. That's good for me, but I wonder, is this a bug or is this the correct behavior?
In other words, will this behavior change in the future?
>>> coffee application.coffee
starting watching: /Users/fatshotty/Desktop/pippuzzo
Error happened { [Error: ENOENT, lstat '/Users/fatshotty/work/test_hook.io/new-file']
errno: 34,
code: 'ENOENT',
path: '/Users/fatshotty/work/test_hook.io/new-file' }
Error happened { [Error: ENOENT, lstat '/Users/fatshotty/work/test_hook.io/new-file-2']
errno: 34,
code: 'ENOENT',
path: '/Users/fatshotty/work/test_hook.io/new-file-2' }
Error happened { [Error: ENOENT, lstat '/Users/fatshotty/work/test_hook.io/new-file-3']
errno: 34,
code: 'ENOENT',
path: '/Users/fatshotty/work/test_hook.io/new-file-3' }
File /Users/fatshotty/Desktop/pippuzzo/.DS_Store has been added
File /Users/fatshotty/Desktop/pippuzzo/Deekline Ed Solo - I Need A Dollar.mp3 has been added
File /Users/fatshotty/Desktop/pippuzzo/Deekline Ed Solo - King of The Bongo.mp3 has been added
File /Users/fatshotty/Desktop/pippuzzo/Ed Solo Deekline - Sensi Ghost Town Feat. DJ Concept.mp3 has been added
File /Users/fatshotty/Desktop/pippuzzo/Ed Solo Deekline - Top Rankin.mp3 has been added
File /Users/fatshotty/Desktop/pippuzzo/Ed Solo Deekline Ragga Tip Walk And Skank.mp3 has been added
File /Users/fatshotty/Desktop/pippuzzo/Ed Solo DJ Deekline - Bad Bwoy.mp3 has been added
File /Users/fatshotty/Desktop/pippuzzo/Soundclash - Raggamuffin.mp3 has been added
>>> mkdir new_folder
>> no output
>>> rm -rf new_folder
File /Users/fatshotty/Desktop/pippuzzo/new_folder has been removed
>>> mkdir new_folder
>> no output
>>> touch new_folder/new_file.txt
File /Users/fatshotty/Desktop/pippuzzo/new_folder/new_file.txt has been added
>>> rm new_folder/new_file.txt
File /Users/fatshotty/Desktop/pippuzzo/new_folder/new_file.txt has been removed
>>> touch new_folder/new_file.txt
File /Users/fatshotty/Desktop/pippuzzo/new_folder/new_file.txt has been added
>>> rm -rf new_folder
Error happened { [Error: ENOENT, readdir '/Users/fatshotty/Desktop/pippuzzo/new_folder']
errno: 34,
code: 'ENOENT',
path: '/Users/fatshotty/Desktop/pippuzzo/new_folder' }
File /Users/fatshotty/Desktop/pippuzzo/new_folder/new_file.txt has been removed
File /Users/fatshotty/Desktop/pippuzzo/new_folder has been removed
Hope this can help.