No description
Find a file
2025-11-25 18:27:49 +08:00
.github Bump actions/checkout from 4 to 6 2025-11-24 19:33:24 +00:00
src Apply suggestions from code review 2024-07-08 09:34:36 +08:00
tests/core Delete t_core.exe 2022-03-27 21:29:59 +08:00
fsnotify.nimble Update fsnotify.nimble 2022-03-28 12:47:45 +08:00
LICENSE Initial commit 2020-09-04 19:17:56 +08:00
README.md update 2022-03-27 21:01:31 +08:00

fsnotify

A file system monitor in Nim

Supporting platform

Platform Watching Directory Watching File
Windows ReadDirectoryChangesW polling using os.getLastModificationTime and os.fileExists
Linux inotify polling using inotify and os.fileExists
Macos TODO(fsevents) polling using os.getLastModificationTime and os.fileExists
BSD Not implemented TODO(kqueue)

Hello, world

import std/os
import fsnotify


proc hello(event: seq[PathEvent]) =
  echo "Hello: "
  echo event

var watcher = initWatcher()
register(watcher, "/root/play", hello)

while true:
  sleep(500)
  process(watcher)