diff --git a/app.coffee b/app.coffee index 44b92486..2724dfc8 100644 --- a/app.coffee +++ b/app.coffee @@ -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() diff --git a/package.json b/package.json index c31ca618..9c7fa152 100644 --- a/package.json +++ b/package.json @@ -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"