anykeyman has asked for the wisdom of the Perl Monks concerning the following question:
Code like map {(stat $_)[9]} readdir($handle) takes up to 2-3 seconds, because there are up to tens thousands files in some folders.
I guess there is some index by mdate in file system, so it is possible to fetch 20 last modified files efficiently.
How to do so?
(I need to run script on various Windows servers, no UNIX. So my guess is to use some WINAPI calls?)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Need efficient way to fetch 20 last modified files from folder
by GrandFather (Saint) on Aug 25, 2012 at 00:30 UTC | |
|
Re: Need efficient way to fetch 20 last modified files from folder
by rpnoble419 (Pilgrim) on Aug 25, 2012 at 01:46 UTC | |
|
Re: Need efficient way to fetch 20 last modified files from folder
by Anonymous Monk on Aug 24, 2012 at 22:55 UTC | |
|
Re: Need efficient way to fetch 20 last modified files from folder
by philiprbrenan (Monk) on Aug 30, 2012 at 18:51 UTC |