DiskSpace Function | |
Return the capacity of the specified disk.
Namespace:
XSharp.Core
Assembly:
XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax FUNCTION DiskSpace() AS INT64
public static long DiskSpace()
Request Example
View SourceReturn Value
Type:
Int64
The capacity of the specified disk drive in bytes.
Remarks
DiskSpace() determines the capacity of the specified disk drive in bytes.
This function is only accurate for disk drives up to 2 gigabytes in size.
For larger drives, please refer to the GetDiskFreeSpaceEx() Windows API function.
Examples
This example displays the capacity of the C drive in a TextBox:
1TextBox{, "C Drive Capacity", AsString( DiskSpace(3) ) }:Show()
2TextBox{, "C Drive Capacity", AsString( DiskSpace("C:") ) }:Show()
See Also