diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-12-10 23:55:09 -0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-12-23 22:15:09 -0800 |
| commit | 91fa252cf20554495e719cacf83f488bef740a67 (patch) | |
| tree | 7989142e4aa9e79b89106076960051c8fa978c02 /lib/std/Io/Dir.zig | |
| parent | 94ef56ee26558daea3c7a1468f898c94735d1658 (diff) | |
| download | zig-91fa252cf20554495e719cacf83f488bef740a67.tar.gz zig-91fa252cf20554495e719cacf83f488bef740a67.zip | |
std.Io: implement dir reading for BSDs
Diffstat (limited to 'lib/std/Io/Dir.zig')
| -rw-r--r-- | lib/std/Io/Dir.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/std/Io/Dir.zig b/lib/std/Io/Dir.zig index 2c6bee99a5..4e70a7be89 100644 --- a/lib/std/Io/Dir.zig +++ b/lib/std/Io/Dir.zig @@ -143,6 +143,12 @@ pub const Reader = struct { if (r.state == .finished) return null; } } + + pub fn reset(r: *Reader) void { + r.state = .reset; + r.index = 0; + r.end = 0; + } }; /// This API is designed for convenience rather than performance: |
