Welcome Guest, Not a member yet? Register   Sign In
get_dir_file_info() hangs when run on a large directory
#3

[eluser]Unknown[/eluser]
I received a suggestion over on stackoverflow that worked.

Instead of pulling all of the information in one command, I ended up breaking it up into two commands get_filenames and get_file_info (which is essentially what you were suggesting):

Code:
$allFiles = get_filenames($folder);
foreach ($allFiles as $fileName)
{
   $fpath = $folder.$fileName;
   $finfo = get_file_info($fpath, array('size','date'));
}

Thanks for replying, I appreciate the help!


Messages In This Thread
get_dir_file_info() hangs when run on a large directory - by El Forum - 12-01-2013, 03:17 PM
get_dir_file_info() hangs when run on a large directory - by El Forum - 12-01-2013, 05:38 PM
get_dir_file_info() hangs when run on a large directory - by El Forum - 12-01-2013, 09:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB