digitalmars.D - std.file
- Russel Winder (21/21) Apr 11 2012 I am hoping I am failing to see the entry in the documentation due to...
- Andrei Alexandrescu (3/12) Apr 11 2012 http://dlang.org/phobos/std_file.html#dirEntries
- Russel Winder (17/20) Apr 11 2012 Andrei,
I am hoping I am failing to see the entry in the documentation due to... Python, Java and Groovy (at least, probably other languages) have functions for iterating over directory hierarchies, i.e. tree walkers / visitors. For example in Python: for root , directories , files in os.walk ( '.' ) : doStuff ( files ) I can see in std.file the tools needed to do this by hand, but I would have thought in this day and age such a function should be in the standard library. Thus I am hoping I am just missing it... Thanks. =20 --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Apr 11 2012
On 4/11/12 9:07 AM, Russel Winder wrote:I am hoping I am failing to see the entry in the documentation due to... Python, Java and Groovy (at least, probably other languages) have functions for iterating over directory hierarchies, i.e. tree walkers / visitors. For example in Python: for root , directories , files in os.walk ( '.' ) : doStuff ( files ) I can see in std.file the tools needed to do this by hand, but I would have thought in this day and age such a function should be in the standard library. Thus I am hoping I am just missing it...http://dlang.org/phobos/std_file.html#dirEntries Andrei
Apr 11 2012
Andrei, On Wed, 2012-04-11 at 09:15 -0500, Andrei Alexandrescu wrote: [...]=20 http://dlang.org/phobos/std_file.html#dirEntries =20Aha, I missed the SpanMode parameter and thought this function only dealt with the current directory without descending. (Note to self: must *read* the manual instead of just skimming it.) Thanks. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Apr 11 2012