Valid on Symbian OS, Windows and Windows CE.
Function format:
GetDiskFree(drivenumb1 as Integer) as Integer
GetDiskFreeB(drivenumb1 as Integer) as Integer
GetDiskFreeKB(drivenumb1 as Integer) as Integer
GetDiskFreeMB(drivenumb1 as Integer) as Integer
Indicates the drive number. Use 0 for the default, 1 for A, 2 for B, and so on.
The functions return the size in a 32-bit integer format. Large disks may exceed the capacity of such a representation, resulting in wrong sizes or negative values due to truncation.
Each function returns an integer, which is the free disk space, as follows:
Free disk space value in KB.
Free disk space value in bytes.
Free disk space value in KB.
Free disk space value in MB.
Note: The GetFileStoreFree function is portable and should be used in preference to GetDiskFree functions.
Example:
Rem
Rem This displays all information about the current drive in KiloBytes
Rem
Dim drive AS Integer
drive = GetDrive()
Print("Current drive is : " + Str( drive ) )
Print("Current drive Size : " + Str( GetDiskSizeKB( drive )) + " KB"))
Print("Current drive Free : " + Str( GetDiskFreeKB( drive ))
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|