<div dir="ltr">and this is further compounded by <a href="http://d.puremagic.com/issues/show_bug.cgi?id=11501">http://d.puremagic.com/issues/show_bug.cgi?id=11501</a> : dirEntries fails with "Failed to stat file" when encountering broken symlinks which i posted couple days ago</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 13, 2013 at 4:20 AM, Timothee Cour <span dir="ltr"><<a href="mailto:thelastmammoth@gmail.com" target="_blank">thelastmammoth@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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" target="_blank">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><div class="h5"><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><div>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><font color="#888888"><br>


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