authorgravatar for hkupty@gmail.comHenry Kupty <hkupty@gmail.com> 2025-09-25 22:20:52+02:00
committergravatar for squeek502@hotmail.comRyan Liptak <squeek502@hotmail.com> 2025-10-03 16:29:08-07:00
logdf394faf776aa7012649dc1724ccb66d78a1439e
tree9ed44dd333d4f8dc2e667ea5d46bbb681d421d03
parent760127a7608f671daa60668a3c60a18058adff13

feat: Reintroduce depth

Some decision-making might depend on the level of the traversal, so it makes sense to expose depth here since it's stable, and not in the automatic walker where it's not.

1 files changed, 4 insertions(+), 0 deletions(-)

lib/std/fs/Dir.zig+4
......@@ -732,6 +732,10 @@ pub const SelectiveWalker = struct {
732732 });
733733 }
734734
735 pub fn depth(self: *SelectiveWalker) usize {
736 return self.stack.items.len;
737 }
738
735739 pub fn deinit(self: *SelectiveWalker) void {
736740 self.name_buffer.deinit(self.allocator);
737741 self.stack.deinit(self.allocator);