using System.IO;
using System;
class abc
{
public static void Main()
{
DriveInfo [] allDrives=DriveInfo .GetDrives ();
foreach (DriveInfo d in allDrives)
{
Console.WriteLine("Drive {0}",d.Name );
Console.WriteLine("File type {0}",d.DriveType );
if (d.IsReady == true)
{
Console.WriteLine("Volumn label :{0}",d.VolumeLabel );
Console.WriteLine("File System:{0}",d.DriveFormat );
Console.WriteLine(
"Available space to current user:{0,15} bytes",
d.AvailableFreeSpace
);
Console.WriteLine("Total available space :{0,15} bytes", d.TotalFreeSpace);
Console.WriteLine("Total size of drive : {0,15}bytes",d.TotalSize );
Console.WriteLine("\n ");
Console.WriteLine("*******************************************");
}
}
}
}