Files
harbour-core/harbour/tests/tstdspac.prg
2000-03-21 21:52:38 +00:00

36 lines
1002 B
Plaintext

/*
$Id$
tstdspac
This program demonstrates that the 4 diskspace related functions work
correctly for disks of any size.
Certain os's may allow limits to the amount of disk space available to
a user. If that is the case, you should see a difference between
the return value of DiskSpace() and DiskFree().
Currently, Disk quota's are only implimented for NT.
NOTE: Unlike Clipper, these functions return a floating point number!
Written by Paul Tucker {ptucker@sympatico.ca>
www - http://www.harbour-project.org
This test program placed in the public domain
*/
proc main( cDisk )
if empty( cDisk )
cDisk := "0"
Endif
cDisk := Val( cDisk )
? "Bytes available on disk: " + Transform( diskspace(cDisk),"999,999,999,999")
? "Bytes available for use: " + Transform( diskfree(cDisk),"999,999,999,999")
? " Bytes used: " + Transform( diskused(cDisk),"999,999,999,999")
? " Total bytes on disk "+PadL(cDisk,2)+": " + Transform( diskFull(cDisk),"999,999,999,999")