mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-22 15:02:23 +00:00
10 lines
245 B
CoffeeScript
10 lines
245 B
CoffeeScript
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()
|