Jackthumper Posted November 25, 2010 Share Posted November 25, 2010 i need help gettig the size of a directory Quote Link to comment Share on other sites More sharing options...
bugcoder Posted November 25, 2010 Share Posted November 25, 2010 found this soloution once <?php /** * Get the directory size * @param directory $directory * @return integer */ function dirSize($directory) { $size = 0; foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory)) as $file){ $size+=$file->getSize(); } return $size; } ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.