packages/library/dirwatch
d

dirwatch

ac6041flibrary

No description provided.

0 stars0 forksZlibupdated 1 month ago
Open repo

WIP

Odin library to watch for changes in a directory.

Note

Primarily for personal use. I will look at issues/PRs at my leisure, or not at all.

Platforms

  • Linux (inotify)
  • Windows (ReadDirectoryChangesExW)

Usage

import "dirwatch"

watch, err := dirwatch.create(10)
defer dirwatch.destroy(&watch)

dirwatch.watch_dir(&watch, "./my-dir", recursive = true)

for {
	if data, ok := chan.try_recv(watch.chan); ok {
		log.info("Event received:", data)
    // e.g. Msg{target = "File", event = Ev_Modified{path = "test.txt"}}
	}
}
Package Info
Version
ac6041f
License
Zlib
Author
@lzurbriggen
Type
library
Forks
0
Created
6 months ago
Updated
1 month ago
Health
maintained
has releases
has readme
has license
Activity
last 56 weeks