Re: dirEntries() and exceptions

2017-11-24 Thread rjframe via Digitalmars-d-learn
On Fri, 24 Nov 2017 12:02:47 +, doc wrote: > I'm trying recursively find files, and have some trouble to catch > exceptions if have no permission to read directory. > ... > > std.file.FileException@std/file.d(3798): > /tmp/systemd-private-8338348a306b4d589e3f6ba2bfd0c8fe-systemd- timesyncd.s

dirEntries() and exceptions

2017-11-24 Thread doc via Digitalmars-d-learn
I'm trying recursively find files, and have some trouble to catch exceptions if have no permission to read directory. [code] void main() { import std.file,std.stdio; auto farray = dirEntries("/tmp", "*.{d,py,pl,sh}", SpanMode.breadth); foreach (f; farray){writeln(f);}} [/code] std.file.FileEx