filemanager icon indicating copy to clipboard operation
filemanager copied to clipboard

Folder Size

Open firesword-bg opened this issue 7 years ago • 0 comments

Hello,

I am using a Linux hosting, and by using this code from line 990, I was able to show the folder Size, not just display "Folder" in the size column.

https://stackoverflow.com/questions/478121/how-to-get-directory-size-in-php

$f = './path/directory'; $io = popen ( '/usr/bin/du -sk ' . $f, 'r' ); $size = fgets ( $io, 4096); $size = substr ( $size, 0, strpos ( $size, "\t" ) ); pclose ( $io ); echo 'Directory: ' . $f . ' => Size: ' . $size; ?>

Perhaps you should consider something similar. You see I use a directory structure for a security camera folders, and I need to know their sizes, in order to delete them.

Regards. Ilian

P.S. how can I donate some $$ ?

firesword-bg avatar Nov 17 '17 14:11 firesword-bg