rejetto forum
Software => HFS ~ HTTP File Server => Bug reports => Topic started by: Steven on October 06, 2009, 01:39:10 AM
-
Well, on my root VFS, I have many real folders and a couple virtual ones. I'm using a custom template based loosely off terayon Great template BTW ;)
Anyhow, on the main page I have a %diskfree% so I can see how much space I'm using. Anytime I browse to a virtual folder, or home, it shows 0B, once I browse into a real folder, it shows 819GB
Any idea how I can get it to show all the time?
-
Sorry, didn't mean to put this in "Bug reports" was searching all forums for a solution just ended up browsing this one last.
Meant to put it under HTML & Templates.
Anyhow, it may be a bug, so here we go:
Running 2.3 beta build 246
Terayon 1.3.2
Windows server 2003 x64
-
Anytime I browse to a virtual folder, or home, it shows 0B, once I browse into a real folder, it shows 819GB. Any idea how I can get it to show all the time?
I'm not sure I totally understand what you are asking. If you are asking how to show the amount of free disk space there is in a virtual folder there is no answer. A virtual folder is virtual. %diskfree% is for real folders located on your harddrive.
You would put the %diskfree% symbol in the [file] section of the template.
-
Gotcha.
Just saw it in the wiki after I posted. Should have looked it over more thoroughly.
-
I realize this question has been answered, though I would like to add to it.
Is there anyway I can display %diskfree% "of folder x" on the root page? The root itself is virtual, but is there anyway to specify the folder to which the %diskfree% refers?
-
It is meaningless to show the %diskfree% value
a) in a homepage (what says that to a visitor?). If someone needs to show what a big server he owns, then simply put '8 TBytes of storage' ;D ;D ;D
b) in a folder for upload the %diskfree% value should not be shown, but used to disable uploads to the server when %diskfree% is less than about 10% of the disks capacity. If you fill up more a disk, your PC can become very slow. When you show directly the free capacity, users might think they could upload until filled.
-
%diskfree% will not change,
but i will add another command {.disk free| your-path .}
in next release
-
"but i will add another command {.disk free| your-path .}"
Awesome. You're the best.
-
Was this actually added in 252? I'm having trouble getting it to work, but it's probably just lack of experience with these fun macros.
-
yes, it's available since #250, but i forgot to announce it and document it.
please refer to http://www.rejetto.com/wiki/index.php/HFS:_scripting_commands#File_manipulation
-
Oh awesome. Thank you sir! It works great!
However (yeah there always seems to be a "but" doesn't there?), it returns the disk free value in bytes. Is there anyway to display it in the 'regular' %diskfree% style?
Right now it displays:
"Disk space: 14535438336"
When I think we would prefer that it displays:
"Disk space: 13.54 GB"
-
{.round|{.div| {.disk free|C:\.} | 1073741824.}|2.}
-
Oh yes, of course!
Thanks again rejetto. Works great.