<div dir="ltr"><div>alas, no, I posted on exactly this some times ago:</div><div>glob is non-recursive in D:<br></div><a href="http://forum.dlang.org/post/mailman.2367.1382320537.1719.digitalmars-d-learn@puremagic.com">http://forum.dlang.org/post/mailman.2367.1382320537.1719.digitalmars-d-learn@puremagic.com</a><div>
<br></div><div>Furthermore, it would be very inefficient to filter out results given by recursive dirEntries that match a glob pattern in general case (I can give examples if needed)</div><div><br><div><br><div class="gmail_extra">
<br><br><div class="gmail_quote">On Mon, Nov 11, 2013 at 11:28 PM, Jacob Carlborg <span dir="ltr"><<a href="mailto:doob@me.com" target="_blank">doob@me.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class=""><div class="h5">On 2013-11-12 00:45, Timothee Cour wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Is there any plan to add recursive globs to dirEntries?<br>
<br>
use case:<br>
<br>
auto entries=dirEntry("foo/**/bar/*<u></u>suffix/*.{d,di}", spanMode,<br>
followSymlink)<br>
will match for example:<br>
foo/a/b/bar/somethingsuffix/<u></u>file.d<br>
<br>
Note, ** will match any number (>=0) of directories, whereas a single *<br>
is non-recursive<br>
<br>
(as found in some good shells and IIRC, later versions of python, etc).<br>
<br>
note, in this case, spanMode could only be breadth or depth, not shallow<br>
as the glob fully specifies depth.<br>
<br>
I have partially working code (it doesn't handle {} but does handle *<br>
and **), however it's not the most efficient, so was wondering.<br>
</blockquote>
<br></div></div>
There's an overload of "dirEntries" that takes a path and a pattern. It says the pattern is matched using std.path.globMatch. "globMatch" matches "*" recursively.<span class=""><font color="#888888"><br>

<br>
-- <br>
/Jacob Carlborg<br>
</font></span></blockquote></div><br></div></div></div></div>