How to list all process directories under /proc/

Ky-Anh Huynh saigon at example.net
Sun Sep 17 08:37:33 UTC 2017


On Sunday, 17 September 2017 at 08:32:24 UTC, Ky-Anh Huynh wrote:
>
> My bad. Range doesn't support. The correct pattern is
>
> [code]
>   foreach (string fstatm; dirEntries("/proc/", "[0123456789]*", 
> SpanMode.shallow)) {
>     writefln("pid %s", fstatm);
>   }
> [/code]
>
> Is there a way to make this simpler?

The official documentation here 
https://dlang.org/phobos/std_path.html#.globMatch refers to the 
wiki page https://en.wikipedia.org/wiki/Glob_%28programming%29 . 
However I think the popular glob rules (man 7 glob) are not 
supported.


More information about the Digitalmars-d-learn mailing list