dirEntries with ** (recursive) globbing

Timothee Cour thelastmammoth at gmail.com
Mon Nov 11 15:45:33 PST 2013


Is there any plan to add recursive globs to dirEntries?

use case:

auto entries=dirEntry("foo/**/bar/*suffix/*.{d,di}", spanMode,
followSymlink)
will match for example:
foo/a/b/bar/somethingsuffix/file.d

Note, ** will match any number (>=0) of directories, whereas a single * is
non-recursive

(as found in some good shells and IIRC, later versions of python, etc).

note, in this case, spanMode could only be breadth or depth, not shallow as
the glob fully specifies depth.

I have partially working code (it doesn't handle {} but does handle * and
**), however it's not the most efficient, so was wondering.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20131111/b34d4bd4/attachment.html>


More information about the Digitalmars-d mailing list