prasathmani / tinyfilemanager

Single-file PHP file manager, browser and manage your files efficiently and easily with tinyfilemanager
https://tinyfilemanager.github.io
GNU General Public License v3.0
4.88k stars 1.66k forks source link

Full size error #1136

Open acastrovargas opened 8 months ago

acastrovargas commented 8 months ago

The full size is not real, it only shows the value of files and not the contents in the folders.

CinNg8j

explorerfaketimepass commented 8 months ago

1100 Check out this PR, as it implements a feature to display disk space usage.

acastrovargas commented 8 months ago

The PR is still not integrated?

ner00 commented 8 months ago

Just note that the script will have to iterate through every sub-folder and its contents to calculate this, every time the page refreshes. I had implemented this on a custom version of mine but had to turn if off due to the performance impact. If you have few files and all with a certain acceptable size, no problem, otherwise the HDD will be taxed immensely.

acastrovargas commented 8 months ago

Thanks, I was about to implement, for this reason I will not do it

hppanpaliya commented 8 months ago

@ner00 No, the script does not iterate through every sub-folder and its contents to calculate disk space. It uses efficient built-in PHP functions (disk_total_space() and disk_free_space()) that directly query the operating system, so it won't heavily tax the HDD.

ner00 commented 8 months ago

@hppanpaliya my misunderstanding then, I was thinking of folder ~file~ size, which is obviously different and that does have to work in the way I described.

acastrovargas commented 8 months ago