ziglang / zig

General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
https://ziglang.org
MIT License
33.86k stars 2.48k forks source link

Watch.zig: Extract File System Watching into Standard Library #20682

Open jayrod246 opened 2 months ago

jayrod246 commented 2 months ago

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

squeek502 commented 2 months ago

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