Cross-platform filesystem event monitor for Nim.
Wraps the libfswatch library.
sudo apt-get install libfswatch11
nimble install fswatch
import times, fswatch
var monitor = newMonitor(latency=0.01)
monitor.add("my-file-path")
proc callback(eg: EventGroup) =
for e in eg:
echo e.path, " ", $e.kind, " ", e.time.utc()
monitor.setCallback(callback)
# blocks here
monitor.start()