mirror of https://github.com/Kylart/KawAnime.git
Added watcher.
This commit is contained in:
parent
c715fbb6d1
commit
9f655116fb
|
@ -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
|
||||
}
|
Loading…
Reference in New Issue