iterate over a directory, dealing with permission errors

Mike Parker aldacron at gmail.com
Sun May 23 14:03:19 UTC 2021


On Sunday, 23 May 2021 at 13:29:26 UTC, xray wrote:
> On Friday, 18 September 2015 at 13:53:45 UTC, Meta wrote:
>> I think you could use std.exception.ifThrown in this case.

> Hello, is it something that still works today ?
> because I have an error :
>
> "no property `ifThrown` for type `std.file.DirIterator"
>
> same if I use handle! directly. Do I need to import some 
> modules ?

`std.exception.ifThrown` means `ifThrown` is in the 
`std.exception` module, so that's what you need to import.

https://dlang.org/phobos/std_exception.html#ifThrown


More information about the Digitalmars-d mailing list