v1.0.11
This release adds two new features that make replicating the --max-depth option of CLI tools like rg and fd simpler. The first is that the fastwalk.DirEntry interface now has a Depth() method which returns the depth of the entry relative to the root being walked (this is useful when manually controlling traversal depth). The second is the new fastwalk.Config.MaxDepth field which will automatically limit traversal depth. Additionally, both features are compatible with symlinks.
Commits:
commit 562386344787021bfe56ace44ccd328d9f2172de Author: Charlie Vieth charlie.vieth@gmail.com Date: Wed May 14 19:21:30 2025 -0400
fastwalk. Add Config.MaxDepth field to limit traversal depth
This commit adds the Config.MaxDepth field which limits the depth of
directory traversal to MaxDepth levels beyond the root directory being
walked. By default, there is no limit on the search depth and a value of
zero or less disables this feature.commit 3d5486c8bf7e4791ef453e91f1fa993d21420b9d Author: Charlie Vieth charlie.vieth@gmail.com Date: Wed May 7 19:45:15 2025 -0400
fastwalk: add new DirEntry.Depth method
The new DirEntry Depth method returns the depth at which the entry was
generated relative to the root being walked. This is useful for programs
that wish to limit traversal depth.