balena-supervisor/app.coffee

10 lines
245 B
CoffeeScript
Raw Normal View History

2013-06-01 18:34:38 +00:00
chokidar = require("chokidar")
watcher = chokidar.watch('/media/', {ignored: /^\./, persistent: true})
watcher.on('add', (path, stats) ->
console.log('File', path, 'has been added')
)
# Only needed if watching is persistent.
#watcher.close()