home *** CD-ROM | disk | FTP | other *** search
/ Power CD-ROM!! 7 / POWERCD7.ISO / prgmming / clipper / disksize.prg < prev    next >
Text File  |  1994-08-29  |  2KB  |  57 lines

  1. /*
  2.  * File......: DISKSIZE.PRG
  3.  * Author....: Dave Pearson
  4.  * BBS.......: The Dark Knight Returns
  5.  * Net/Node..: 050/069
  6.  * User Name.: Dave Pearson
  7.  * Date......: $Date$
  8.  * Revision..: $Revision$
  9.  * Log file..: $Logfile$
  10.  *
  11.  * This is an original work by Dave Pearson and is placed in the public
  12.  * domain.
  13.  *
  14.  * Modification history:
  15.  * ---------------------
  16.  *
  17.  * $Log$
  18.  *
  19.  */
  20.  
  21. /*  $DOC$
  22.  *  $FUNCNAME$
  23.  *      GT_DISKSIZE()
  24.  *  $CATEGORY$
  25.  *      Disk Drive
  26.  *  $ONELINER$
  27.  *      Return the size of a disk in bytes.
  28.  *  $SYNTAX$
  29.  *      GT_DiskSize([<ncDrive>]) --> nDiskSize
  30.  *  $ARGUMENTS$
  31.  *      <ncDrive> is an optional parameter that is the id of the drive
  32.  *      to be checked. This paramater can be either a character value
  33.  *      who's first character is taken as the drive letter or a numeric
  34.  *      value where 0 = Default, 1 = A:, 2 = B:, etc... If no parameter
  35.  *      is passed the default drive is used.
  36.  *  $RETURNS$
  37.  *      The size of the disk in bytes.
  38.  *  $DESCRIPTION$
  39.  *      GT_DiskSize() can be used the find the size of a disk in bytes.
  40.  *  $EXAMPLES$
  41.  *      // Each of the following print the size of drive C:
  42.  *
  43.  *      ? GT_DiskSize("C:")
  44.  *      ? GT_DiskSize("C")
  45.  *      ? GT_DiskSize("Clipper")         // First letter is used only.
  46.  *      ? GT_DiskSize(3)
  47.  *
  48.  *      // The next two print the size of the current drive.
  49.  *
  50.  *      ? GT_DiskSize(0)
  51.  *      ? GT_DiskSize()
  52.  *  $END$
  53.  */
  54.  
  55. function GT_DiskSize(ncDrive)
  56. return(GT_SecPClu(ncDrive)*GT_SectSiz(ncDrive)*GT_Cluster(ncDrive))
  57.