mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-21 06:33:30 +00:00
Reinit commit
This commit is contained in:
parent
e1622813aa
commit
ebe036e02a
15
app.coffee
15
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()
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user