Valid on Symbian OS, Windows, and Windows CE
The GetDiskUsage and the GetDiskUsageKB functions return the amount of disk usage in KB, the GetDiskUsageB function returns the amount of disk usage in bytes, and the GetDiskUsageMB function returns the amount of disk usage in MB.
Function format:
GetDiskUsage(drivenumb1 as Integer) as Integer
GetDiskUsageB(drivenumb1 as Integer) as Integer
GetDiskUsageKB(drivenumb1 as Integer) as Integer
GetDiskUsageMB(drivenumb1 as Integer) as Integer
Indicates the drive number.
The functions return the size in a 32-bit integer format. Large disks may exceed the capacity, resulting in wrong sizes or negative values due to truncation.
The drive is indicated by the drivenumb1 parameter, which specifies a drive number: 0 for the default, 1 for A, 2 for B, and so on.
Each function returns an integer, which is the disk usage, as follows:
Indicates the disk usage value in KB.
Indicates the disk usage value in bytes.
Indicates the disk usage value in KB.
Indicates the disk usage value in MB.
Note: Use the GetFileStore function instead as it is portable.
Example:
Dim drive AS Integer
drive = GetDrive()
Print("Current drive is : " + Str( drive ))
Print("Current drive Size : " + Str( GetDiskSizeMB( drive )) + " MB"))
Print("Current drive Free : " + Str( GetDiskFreeMB( drive )) +
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|