DriveInfo: AvaiableFreeSpace, DriveFormat, TotalFreeSpace, VolumnLabel : Drive « Stream File « VB.Net Tutorial






Imports System.IO

public class Test
   public Shared Sub Main
        Dim drive_info As New DriveInfo("c:\")
        Console.WriteLine(drive_info.Name())
        Console.WriteLine(drive_info.IsReady())
        Console.WriteLine(drive_info.DriveType())
        Console.WriteLine(drive_info.RootDirectory)
        If drive_info.IsReady() Then
            Console.WriteLine(drive_info.AvailableFreeSpace())
            Console.WriteLine(drive_info.DriveFormat())
            Console.WriteLine(drive_info.TotalFreeSpace())
            Console.WriteLine(drive_info.VolumeLabel())
        End If


   End Sub
End class
c:\
True
3
c:\
35531018240
NTFS
35531018240








13.15.Drive
13.15.1.Get current Drive
13.15.2.Get Logical drives
13.15.3.DriveInfo: Name, IsReady, DriveType, RootDirectory
13.15.4.DriveInfo: AvaiableFreeSpace, DriveFormat, TotalFreeSpace, VolumnLabel
13.15.5.DriveInfo.GetDrives