paulmillr / chokidar

Minimal and efficient cross-platform file watching library
https://paulmillr.com
MIT License
10.8k stars 574 forks source link

In Synology device, cannot watch file change #1325

Closed Allure-eve closed 2 months ago

Allure-eve commented 2 months ago

code like this,it works in virtual machine(windows&centos 7) but doesnt works on Synology device(Only @eaDir can be watch) any solution?

export function startWatcher() {
  const watch_path = PlatformTools.pathNormalize(env.WATCHER_PATH)

  print.info(`watch_path=>${watch_path}`)
  const watcher = chokidar.watch(watch_path, {
    persistent: true,
    awaitWriteFinish: true,
    depth: 3,
  })
  watcher.on('add', onAddFileHandler)
}