listdir alternative
BCS
ao at pathlink.com
Tue Jan 6 18:36:04 PST 2009
Reply to James,
> im trying to recursively read large folders but it seems listdir fails
> to get all file list. out of 2,000 files i only get 11 files. is there
> any other portable solution, since im writing a program which suppose
> to run on windows and linux.
>
IIRC listdir is not recursive. It would be almost trivial however to create
a recursive version that can be passed into foreach like this
foreach(string path; AllFiles(rootDir))
{
///stuff
}
you would need to use the feature where foreach can take a (in this case)
"int delegate(int delegate(string))".
More information about the Digitalmars-d-learn
mailing list