DriveInfo类的基本操作
来源:互联网 发布:炒外汇软件哪个好 编辑:程序博客网 时间:2024/05/20 21:19
DriveInfo类:提供查询驱动器信息的方法和属性,通过下面的例子来说明。
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;namespace DriveInfoDemo{ class Program { static void Main(string[] args) { DriveInfo[] allDrives = DriveInfo.GetDrives(); foreach (DriveInfo d in allDrives) { Console.WriteLine("驱动器:{0}",d.Name); Console.WriteLine("类型:{0}",d.DriveType); if (d.IsReady) { Console.WriteLine("卷标:{0}", d.VolumeLabel); Console.WriteLine("文件系统:{0}", d.DriveFormat); Console.WriteLine("当前可用空间:{0}", d.AvailableFreeSpace); Console.WriteLine("可用空间:{0}",d.TotalFreeSpace); Console.WriteLine("磁盘总大小:{0}",d.TotalSize); } } Console.ReadLine(); } }}
0 0
- DriveInfo类的基本操作
- DriveInfo 类
- DriveInfo 类
- DriveInfo类
- DriveInfo Directory File类和FileInfo类知识点 文本文件操作
- ASP.NET 磁盘操作 文件体系 IO体系 DriveInfo类
- ASP.NET 磁盘操作 文件体系 IO体系 DriveInfo类
- 温故知新--DriveInfo类
- DriveInfo类查看磁盘信息
- 类的基本操作
- 用DriveInfo类获取磁盘信息 多种方法
- delphi基本类的操作
- FileInfo类的基本操作
- File类的基本操作
- RandomAccessFile类的基本操作
- 类的基本操作-初学者
- RandomAccessFile类的基本操作
- String类的基本操作
- Maximal Square Leetcode Java
- 设计模式--简单工厂模式
- chapter10test1
- linux sar命令详解
- 全排列
- DriveInfo类的基本操作
- 13、opencv学习笔记1
- GLIB 常用数据结构介绍 1
- Java 学习————多线程同步
- 常用打印堆栈方法
- HDU ACM 1017 A Mathematical Curiosity 水题
- HDU 1723 Distribute Message--DP--(特殊意义)
- 第十一周项目-1.2
- C#Socket服务器开发(Unity)