Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- GT_LIB v1.0 Reference Guide Release 1.0 - <b>calculate the ``real'' size of a file.</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Calculate the ``real'' size of a file.
------------------------------------------------------------------------------

 Syntax

        GT_FileSpace([<cFileName>],[<ncDrive>]) --> nFileSpace

 Arguments:

      <cFileName> is an optional parameter that is the name of the file
      to be checked. This paramater may be a single filename or can be
      a wildcard. If not supplied the default is "*.*".

      <ncDrive> is an optional parameter that is the id of the drive
      for which the calculation is to be done. This paramater can be
      either a character value who's first character is taken as the
      drive letter or a numeric value where 0 = Default, 1 = A:,
      2 = B:, etc... If no parameter is passed the default drive is used.

 Returns:

      The ``real'' size of the file(s).

 Description:

      GT_FileSpace() can be used to calculate the ``real'' size of a
      single file or a set of files.

      This can be of use if you wish to check that a set of files will
      fit into the available space on a drive. As you probably know
      a file that is just 1 byte in size will use up one cluster of
      disk space, so, for example, if the cluster size of a drive is
      2048 bytes a 1 byte file will use up 2048 bytes of storage.

 Examples:

      // Display the ``real'' size of all files in the current directory.

      ? GT_FileSpace()

      // Display the ``real'' size of the same files if they were
      // copied to a network drive called F:.

      ? GT_FileSpace(,"F:")

      // Now check just the DBF files.

      ? GT_FileSpace("*.Dbf","F:")

 Source: FILSPACE.PRG

 Author:  Dave Pearson

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