Reinit commit

This commit is contained in:
ligouras 2013-06-01 19:57:36 +01:00
parent e1622813aa
commit ebe036e02a
2 changed files with 9 additions and 8 deletions

View File

@ -1,9 +1,10 @@
chokidar = require("chokidar")
wrench = require("wrench")
watcher = chokidar.watch('/media/', {ignored: /^\./, persistent: true})
watcher.on('add', (path, stats) ->
console.log('File', path, 'has been added')
files = []
wrench.readdirRecursive('/media', (error, curFiles) ->
if error?
console.error error
else
console.log curFiles
)
# Only needed if watching is persistent.
#watcher.close()

View File

@ -3,7 +3,7 @@
"version": "0.0.1",
"dependencies": {
"coffee-script": "1.6.x",
"chokidar": "0.6.x"
"wrench": "1.5.x"
},
"engines": [
"node >= 0.10.x"