/*
 * $Id: diskspac.txt,v 1.3 2007/08/24 08:05:53 paultucker Exp $
 */

/*
 * The following are Copyright of the individual authors.
 * www - http://www.harbour-project.org
 *
 * Copyright 2000 Paul Tucker <ptucker@sympatico.ca>
 *    Documentation for: DISKSPACE() and related functions
 *
 * See doc/license.txt for licensing terms.
 *
 */

/*  $DOC$
 *  $FUNCNAME$
 *      DISKSPACE()
 *  $CATEGORY$
 *      Low Level
 *  $ONELINER$
 *      Get the amount of space available on a disk
 *  $SYNTAX$
 *      DISKSPACE( [<nDrive>] ) --> nDiskbytes
 *          Be sure to see hb_diskspace(...)
 *  $ARGUMENTS$
 *      <nDrive> The number of the drive you are requesting info on where 1 = A,
 *      2 = B, etc. For 0 or no parameter, DiskSpace will operate on the current
 *      drive.  The default is 0
 *  $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.
 *
 *      If information is requested on a disk that is not available, a runtime
 *      error 2018 will be raised.
 *  $EXAMPLES$
 *      ? "You can use : " +Str( DiskSpace() ) + " bytes " +;
 *      Note: See tests\tstdspac.prg for another example
 *  $STATUS$
 *      R
 *  $COMPLIANCE$
 *      This function is Ca-Clipper compliant
 *  $PLATFORMS$
 *      Dos,Win32,OS/2
 *  $FILES$
 *      Library is rtl
 *      Header is fileio.ch
 *  $END$
 */

/*  $DOC$
 *  $FUNCNAME$
 *      HB_DISKSPACE()
 *  $CATEGORY$
 *      Low Level
 *  $ONELINER$
 *      Get the amount of space available on a disk
 *  $SYNTAX$
 *      HB_DISKSPACE( [<nDrive> | <cPath>] [, <nType>] ) --> nDiskbytes
 *  $ARGUMENTS$
 *      <cPath> The drive and Directory you are requesting info on. The
 *      default is the root of the 'current' disk. A path is required because
 *      Under some OS, c:\dirOne and c:\dirtwo can be on two different
 *      physical drives.
 *       or
 *      <nDrive> The number of the drive you are requesting info on where 1 = A,
 *      2 = B, etc. For 0 or no parameter, HB_DiskSpace will operate on the
 *      root of the current drive.  The default is 0
 *
 *      <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 root of the current drive that is available to the
 *      user requesting the information.
 *
 *      There are 4 types of information available:
 *
 *       HB_DISK_AVAIL    The amount of space available to the user making the
 *                        request.  This value could be less than HB_DISK_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_DISK_FREE.
 *       HB_DISK_FREE     The actual amount of free diskspace on the drive.
 *       HB_DISK_USED     The number of bytes in use on the disk.
 *       HB_DISK_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_DISK_TOTAL) )
 *
 *      Note: See tests\tstdspac.prg for another example
 *  $STATUS$
 *      R
 *  $COMPLIANCE$
 *      Given the same parameter as Diskspace(), This is Diskspace compatible.
 *      <nType> is a Harbour extension.
 *  $PLATFORMS$
 *      Dos,Win32,OS/2,Unix
 *  $FILES$
 *      Library is rtl
 *      Header is fileio.ch
 *  $END$
 */
