|
Boost : |
From: Carl Daniel (cpdaniel_at_[hidden])
Date: 2002-07-19 13:14:03
"Giovanni Bajo" <giovannibajo_at_[hidden]> wrote in message
news:294f01c22f47$e81e5280$7a4e2a97_at_bagio...
> One may ask why you need a directory_list, when you could simply have a
> make_directory_list() (with the overloads shown above for the constructor)
> and returning a list<fs::path>. The answer is that I really like lazy
> evaluation for directory browsing (especially when dealing with subdir
> recursion). A simple make_directory_list() would have to browse all the
> files to create a complete list<fs::path>, while a directory_list can be
> "constructed" on the fly, when the elements are requested by the user.
I agree with everything said in this thread, I'll also admit that I haven't
tried the filesystem library yet.
The need for lazy evaluation is absolute: in one of my server applications,
we have a cache directory that can have 100,000 or more files in it - a
full-search of the directory before I can see even the first file would be
completely unacceptable (simply iterating the directory under Linux on a
Dual P-III 850Mhz takes 10 minutes... and that's from a local SCSI-3 10K rpm
drive!)
-cd
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk