Added watcher.

This commit is contained in:
Kylart 2017-03-31 15:04:16 +02:00
parent c715fbb6d1
commit 9f655116fb
1 changed files with 22 additions and 0 deletions

22
src/watcher/watcher.js Normal file
View File

@ -0,0 +1,22 @@
/**
* Created by Kylart on 30/03/2017.
*/
const self = this
const fs = require('fs')
const os = require('os')
const path = require('path')
const ROOT_DIR = os.userInfo().homedir
const DIR = path.join(ROOT_DIR, '.KawAnime')
const watchConf = (callback) => {
fs.watchFile(path.join(DIR, 'config.json'), (event) => {
console.log(event)
})
}
module.exports = {
watchConf
}