[feat] fs.watch (#3249)

* initial support

* add types

* fix comment

* fix types

* bigfix up

* more fixes

* fix some encoding support for watch

* fix rename event

* fixup

* fix latin1

* add fs_events, still failing some tests

* fixuup

* remove unecesary check

* readd tests ops

* this is necessary? just testing CI/CD weird errors

* just use dupe here

* cleanup and fix deinit

* fix zig upgrade
This commit is contained in:
Ciro Spaciari
2023-06-24 03:24:34 -03:00
committed by GitHub
parent ceec1afec2
commit 069b42a7cc
36 changed files with 3072 additions and 27 deletions

View File

@@ -2609,6 +2609,13 @@ pub fn NewHotReloader(comptime Ctx: type, comptime EventLoopType: type, comptime
return this.tombstones.get(key);
}
pub fn onError(
_: *@This(),
err: anyerror,
) void {
Output.prettyErrorln("<r>Watcher crashed: <red><b>{s}<r>", .{@errorName(err)});
}
pub fn onFileUpdate(
this: *@This(),
events: []watcher.WatchEvent,