haltcase / glob

Pure Nim library for matching file paths against Unix style glob patterns.
https://glob.bolingen.me
MIT License
61 stars 5 forks source link

[WIP] [TODO] support proper DFS #16

Closed timotheecour closed 5 years ago

timotheecour commented 6 years ago

partially address https://github.com/citycide/glob/issues/9

echo listGlob("tests/t48_glob/a", includeDirs=true).join("\n")

now gives a proper DFS order:

tests/t48_glob/a
tests/t48_glob/a/b0.txt
tests/t48_glob/a/b1
tests/t48_glob/a/b1/c2.txt
tests/t48_glob/a/b1/c1.txt
tests/t48_glob/a/b3.txt
tests/t48_glob/a/b2
tests/t48_glob/a/b2/c1.txt

instead of the previous scrambled order:

tests/t48_glob/a/b2
tests/t48_glob/a/b3.txt
tests/t48_glob/a/b1
tests/t48_glob/a/b0.txt
tests/t48_glob/a/b1/c1.txt
tests/t48_glob/a/b1/c2.txt
tests/t48_glob/a/b2/c1.txt
haltcase commented 5 years ago

@timotheecour I'm going to close this since it's been 6 months and there have been quite a few changes to the library, so I'm assuming this would need a fair bit of rework. Feel free to come back to it any time.