Recommend this page to a friend! | ![]() |
![]() |
All requests ![]() |
> | Find Large Files | > | Request new recommendation | > | ![]() |
> | ![]() |
||
by Gerry Danen - 4 months ago (2015-10-07) find large files
+4 | Is there a class that will traverse an entire server and list all files over a certain (5MB, for example) size? |
+2 |
To give another variety, PHP5 Iterators, Regex supported, Composer ready To find files above a certain size, when looping the search results, simply use the $file->getSize() method provided with the DirectoryIterator class. |
+2 |
The in() method lists all the files in a given directory, and returns an array of the names. You can filter out which files you want with a size() method. see example $find = new Find;
Filter files by size |
+5 |
Looks like this one will do it with a little modification. It currently has a method that filters out any file that is not an image which can be changed and it does list file size which should be able to be used as the filter instead. |
1. by Gerry Danen - 4 months ago (2015-10-09) Reply
Thanks, Dave. I believe that will indeed do the trick.
Recommend package | |
|