int :sysinfo-disk-used ( string $PATH )
int :sysinfo-disk-used
Returns the amount space used (in bytes) on given disk. The parameter string is expected to contain a directory path - either relative or absolute. Under Windows, the function will refer to the appropriate disk - C:
, D:
, et cetera. Under Linux, the function will refer to the disk the directory resides on. When called with no parameter, refers to the current directory.
# sysinfo-disk-used example. !fun :GiB $NUM :return :div (:mkfloat $NUM) :pow i2 i30 !nuf :writeln s'Disk size: ' (:GiB :sysinfo-disk-total s'/') s'GiB' :writeln s'Used: ' (:GiB :sysinfo-disk-used s'/') s'GiB'
wikistrona zmodyfikowana 2014/0601/2317