zig icon indicating copy to clipboard operation
zig copied to clipboard

Watch.zig: Extract File System Watching into Standard Library

Open jayrod246 opened this issue 1 year ago • 1 comments

When Watch.zig matures with more supported platforms, it would be useful to have that logic extracted out into a standard library API for directory watching. Something like std.fs.Dir.Watch

jayrod246 avatar Jul 19 '24 16:07 jayrod246

For context, something like this did exist previously:

https://github.com/ziglang/zig/blob/8d11ade6a769fe498ed20cdb4f80c6acf4ca91de/lib/std/fs/watch.zig

but it bitrotted since it wasn't used internally and was eventually removed in https://github.com/ziglang/zig/pull/18712

squeek502 avatar Jul 19 '24 18:07 squeek502

There is also the Bun file watcher implementation: https://github.com/oven-sh/bun/blob/main/src/Watcher.zig

remorses avatar Mar 19 '25 22:03 remorses