diff --git a/src/watcher/watcher.js b/src/watcher/watcher.js new file mode 100644 index 0000000..710be55 --- /dev/null +++ b/src/watcher/watcher.js @@ -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 +} \ No newline at end of file