|
Boost Users : |
Subject: Re: [Boost-users] Filesystem: Choose random file from directory
From: Charles Mills (charlesm_at_[hidden])
Date: 2012-06-23 15:27:39
Generate a random number 'n' between 1 and 500K and then take the nth file
from the directory.
Do you need truly random (in a math or crypto sense) or just "unpredictable
and varied"?
Charles
-----Original Message-----
From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of Andrej van der Zee
Sent: Friday, June 22, 2012 6:28 PM
To: boost-users_at_[hidden]
Subject: [Boost-users] Filesystem: Choose random file from directory
Hi,
I have a directory with about 500.000 thousand small files in it. I need to
randomly select one of those file. What would be the *most
efficient* way to achieve this?
Thank you,
Andrej
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net