[erlang-patches] Support ** for recursion in filelib:wildcard

José Valim <>
Fri Jan 20 10:14:23 CET 2012


Some programming languages/softwares (Bash, RACF, Ruby, ...) support "**"
for automatic directory recursion when doing a glob. A very convenient use
of this feature is to get all files recursively with a given extension:

    filelib:wildcard("src/**/*.erl").

Notice we don't need to loop recursively and it also requires fewer
filesystem lookups. I am aware filelib:fold_files allows recursion, but I
consider filelib:wildcard simpler to use.

My proposal is to extend filelib:wildcard to support "**". I can provide a
patch with docs if you agree to have this feature merged in.


*
José Valim
www.plataformatec.com.br
Founder and Lead Developer
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20120120/ab1edf7d/attachment.html>


More information about the erlang-patches mailing list