This would be a welcome addition. However, notice that our wildcard
implementation simply relies on Erlang's filelib:wildcard/2. So the first
path would be to add filelib:match/2 to Erlang. Feel free to ping me on IRC
if you need help or guidance to get this started on the Erlang side.

On Sun, Oct 3, 2021 at 8:27 AM Jon Leighton <he...@jonleighton.name> wrote:

>
> Hi there,
>
> I have published a new library called path_glob:
> https://github.com/jonleighton/path_glob
>
> It aims to implement glob matching without touching the filesystem. That
> is, if a path is returned by Path.wildcard(glob, opts), then
> PathGlob.match?(path, glob, opts) should return true. This is much more
> performant in cases where we have a single path to check against a glob,
> and the glob would result in a lot of filesystem traversal.
>
> I wonder whether this would be a candidate for inclusion into core Elixir?
> It seems that it might be generally useful and it complements the
> functionality already provided by Path.wildcard/2.
>
> The parser is implemented with nimble_parsec. I presume that if it were
> included into Elixir core then we wouldn't want that dependency, but we
> could check in the generated parser source to avoid it.
>
> Cheers,
> Jon
>
> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elixir-lang-core+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elixir-lang-core/573439f2-7de7-458c-94bf-0b33eba666bdn%40googlegroups.com
> <https://groups.google.com/d/msgid/elixir-lang-core/573439f2-7de7-458c-94bf-0b33eba666bdn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4JA3dBOwy_bf4Lubu%2BxGj3S_8PcxACfXqKd6vJbWcGLYg%40mail.gmail.com.

Reply via email to