aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Io/Dir.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-12-10 23:55:09 -0800
committerAndrew Kelley <andrew@ziglang.org>2025-12-23 22:15:09 -0800
commit91fa252cf20554495e719cacf83f488bef740a67 (patch)
tree7989142e4aa9e79b89106076960051c8fa978c02 /lib/std/Io/Dir.zig
parent94ef56ee26558daea3c7a1468f898c94735d1658 (diff)
downloadzig-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.zig6
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: