Valid on Symbian OS, Windows, and Windows CE
The GetDiskSize function returns the disk size in KB, the GetDiskSizeB function returns the disk size in bytes, the GetDiskSizeKB function returns the disk size in KB, and the GetDiskSizeMB function returns the disk size in MB.
Function format:
GetDiskSize(drivenumb1 as Integer) as Integer
GetDiskSizeB(drivenumb1 as Integer) as Integer
GetDiskSizeKB(drivenumb1 as Integer) as Integer
GetDiskSizeMB(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 disk size, as follows:
Disk size value in KB.
Disk size space value in bytes.
Disk size value in KB.
Disk size value in MB.
Note: Use the GetFileStoreSize function, which is portable, instead of the GetDiskSize functions.
Example:
Dim Size,Used,Free as integer Dim out as string Size=GetDiskSize(3) if (Size<>-1) then out="Total size: "+chr(9)+str(Size)+" bytes"+ chr(10) Used=GetDiskUsage(3) out=out+"Bytes used: "+chr(9)+str(Used)+" bytes"+ chr(10) Free=GetDiskFre
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|