Files
harbour-core/tests/diskspac.prg
vszakats 9687850865 2013-03-16 02:10 UTC+0100 Viktor Szakats (harbour syenar.net)
* (all files)
    * stripped svn header
    * minor cleanups
    ; use following command to find out the history of files:
       git log
       git log --follow
       git blame
       git annotate
2013-03-16 02:11:42 +01:00

33 lines
1.1 KiB
Plaintext

/*
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://harbour-project.org
This test program placed in the public domain
*/
#include "fileio.ch"
PROCEDURE Main( cDisk )
IF Empty( cDisk )
cDisk := hb_DirBase() + hb_ps()
ENDIF
? "Bytes available on disk: " + Transform( hb_DiskSpace( cDisk, HB_DISK_FREE ), "999,999,999,999" )
? "Bytes available for use: " + Transform( hb_DiskSpace( cDisk, HB_DISK_AVAIL ), "999,999,999,999" )
? " Bytes used: " + Transform( hb_DiskSpace( cDisk, HB_DISK_USED ), "999,999,999,999" )
? " Total bytes at " + cDisk + ": " + Transform( hb_DiskSpace( cDisk, HB_DISK_TOTAL ), "999,999,999,999" )
RETURN