Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Text;
- using System.IO;
- namespace tmpGetAllDrives
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("List of drives:");
- DriveInfo[] Drives = DriveInfo.GetDrives();
- foreach (DriveInfo drive in Drives)
- {
- Console.WriteLine("Drive: {0}", drive.Name); //имя диска
- Console.WriteLine("Drive format: {0}", drive.DriveFormat); //файловая система
- Console.WriteLine("Drive type: {0}", drive.DriveType); // Тип диска
- Console.WriteLine("Drive root: {0}", drive.RootDirectory); //Корневой каталог
- Console.WriteLine("Drive label: {0}", drive.VolumeLabel); //Метка тома
- Console.WriteLine("Drive free space: {0}", drive.TotalFreeSpace); //Свободное место (байт)
- Console.WriteLine("Drive total size: {0}", drive.TotalSize); //Размер (байт)
- Console.WriteLine("Drive ready status: {0}", drive.IsReady); //Готовность диска
- Console.WriteLine("==============================================");
- }
- Console.WriteLine("Press Enter...");
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement