Drive Format : Drive « File Stream « C# / C Sharp
- C# / C Sharp
- File Stream
- Drive
Drive Format
using System;
using System.IO;
class MainClass {
static void Main(string[] args) {
FileInfo file = new FileInfo("c:\\a.txt");
DriveInfo drv = new DriveInfo(file.FullName);
Console.Write("Drive: ");
Console.WriteLine(drv.Name);
if (drv.IsReady) {
Console.WriteLine(drv.DriveFormat.ToString());
}
}
}
Related examples in the same category