Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - diskfree() return free disk space on the specified drive http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 diskfree()          Return free disk space on the specified drive
------------------------------------------------------------------------------
 Declaration
   file.hdr

 Syntax
   func ulong diskfree extern
   param value uint uDrive

 Arguments
   uDrive is the drive number to retrieve information about.
   0 is the current drive, 1 is drive A:, 2 is drive B:, etc.

 Return
   Number of free bytes on the specified drive.

 Description
   The diskfree() function returns the free disk space on the drive
   specified by uDrive. Note that the function is nearly identical to
   the diskspace() function except the drive numbering.

 Example
   #define EXAMPLE_FILE
   #include example.hdr

   func char FreeString
   param value uint nDrive
   // Return string expressing total disk space on passed drive
   return( "Free disk space on drive " + istr( nDrive ) + " is " + ;
      numcomma( istr( diskfree( nDrive ) ) ) + " bytes" )
   endfunc
   
   proc Test_diskfree
   ? FreeString( 0 )       // total disk space on current drive
   ? FreeString( 3 )       // total disk space on drive C:
   endproc

   proc main
   Test_diskfree()
   endproc

See Also: diskspace() disktotal()

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