Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Harbour Version 0.37 (c) reference Guid - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

HB_DISKSPACE()

Get the amount of space available on a disk
---------------------------------------------------------------------------------

 Syntax

        HB_DISKSPACE( [<cDrive>] [, <nType>] ) --> nDiskbytes  

 Arguments

        <cDrive>   The drive letter you are requesting info on. The 
                  default is A:

        <nType>   The type of space being requested.The default is 
                  HB_DISK_AVAIL.

 Returns

        <nDiskBytes>   The number of bytes on the requested disk that 
                  match the requested type.

 Description

      By default, this function will return the number of bytes of  free
      space on the current drive that is available to the user
      requesting the information.

      There are 4 types of information available:

      HB_FS_AVAIL    The amount of space available to the user making the
      request.  This value could be less than HB_FS_FREE if  disk quotas
      are supported by the O/S in use at runtime,  and disk quotas are in
      effect.  Otherwise, the value  will be equal to that returned for
      HB_FS_FREE.

      HB_FS_FREE     The actual amount of free diskspace on the drive.

      HB_FS_USED     The number of bytes in use on the disk.

      HB_FS_TOTAL    The total amount of space allocated for the user if
      disk quotas are in effect, otherwise, the actual size  of the
      drive.

      If information is requested on a disk that is not available, a
      runtime  error 2018 will be raised.

 Examples

      ? "You can use : " +Str( HB_DiskSpace() ) + " bytes " +;
        "Out of a total of " + Str( HB_DiskSpace('C:',HB_FS_TOTAL) )

      Note: See tests\tstdspac.prg for another example

Status

      Ready

 Compliance

      CA-Clipper will return an integer value which limits it's usefulness
      to  drives less than 2 gigabytes.  The Harbour version will return
      a  floating point value with 0 decimals if the disk is > 2
      gigabytes.  <nType> is a Harbour extension.

 Platforms

      Dos,Win32,OS/2,Unix

 Files

      Library is rtl  Header is fileio.ch
      Library is rtl  Header is fileio.ch

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson