Component Library JacekMatulewski.Util documentation

DiskFreeBar.GetDiskInfo Method 

Gets the size of free and total space aviable at drive given as the parameter.

[Visual Basic]
Public Shared Function GetDiskInfo( _
   ByVal driveLetter As Char, _
   ByVal desiredInformation As String _
) As Long
[C#]
public static long GetDiskInfo(
   char driveLetter,
   string desiredInformation
);

Parameters

driveLetter
The one character which characterize the drive.
desiredInformation
String argument passed to System.Management.ManagementObject. Possible values are "Size" or "FreeSpace".

Return Value

Number of bytes of free or total space on the disk pointed by driveLetter.

Remarks

Values returned bye this method can be easier get using DiskSize, DiskFreeSpace and DiskOccupiedSpace properties.

See Also

DiskFreeBar Class | JacekMatulewski.Util Namespace