lpath
lpath copied to clipboard
Behavior of `fs.glob`
I am looking to use lpath in my own project. Upon testing, I found that the wildcards didn't work as I would expect them to. If I do fs.glob "./*"
, it lists all subnodes recursively. However, if I do fs.glob "./*.lua"
, it will not match all .lua
files recursively, only at the top level. Using a double star (./**.lua
) changes nothing.
There is no documented behavior for this function. Would it be possible to have a section explaining how it works? And how would I be able to match all subnodes recursively with a certain extension using a glob iterator?
It should be **/*.lua
I'll make a documents for this.
I've been committed a refactoring version of pb.glob()
with the simplified code. Please check it out and try to find whether it fits the description and your needs.