-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
Description
"dependencies": {
"fswatch": "~>0.6.1"
"versions": []dmd --versionDMD64 D Compiler v2.105.3
Copyright (C) 1999-2023 by The D Language Foundation, All Rights Reserved written by Walter Bright
uname -aLinux i7 6.1.0-13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.55-1 (2023-09-29) x86_64 GNU/Linux
sample code:
void watcher() {
auto src = FileWatch("src/", true);
auto views = FileWatch("views/", true);
auto dub = FileWatch("dub.json", true);
while (true) {
Thread.sleep(1111.msecs);
foreach (e; src.getEvents)
writeln(e.path, '\t', e.type);
foreach (e; views.getEvents)
writeln(e.path, '\t', e.type);
foreach (e; dub.getEvents)
writeln(e.path, '\t', e.type);
}
}
void main(string[] args) {
writeln(args);
// autorestart
spawn(&watcher);