rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: raybob on July 05, 2011, 11:48:43 PM

Title: Size of folders
Post by: raybob on July 05, 2011, 11:48:43 PM
Would there be any way to implement a native way to get the size of folders?

Both so that A) would display the size of both folders and files on the panel and B) so that the {.filesize.} macro would work with folders also - ex. {.filesize|C:\test\.}

Title: Re: Size of folders
Post by: Mars on July 06, 2011, 07:39:05 AM
Without big complexity, you can use a combination of a DOS command  (dir c:\test) by getting back the result, by means of the macro {.exec ¦     .}

But the calculation of the size of a directory is always boring and long

Title: Re: Size of folders
Post by: rejetto on August 21, 2011, 09:05:35 AM
this was already discussed in the past, and 1 or 2 solutions were suggested.
Problem is: calculating the size of a folder may take forever, best thing is to pre-calculate and store.
But this sets another problem: keeping the information up to date.
And i'm not even considering the additional problems HFS brings: you can set a filter and hide some files, so when you enter the folder you may not find as many bytes as you showed outside.
I don't have a good solution for this, and until that you won't find an embedded solution.