Suppose there is a shared drive.
Is it possible to find out how much free space is left on the disk where the shared disk is located?
Suppose there is a shared drive.
Is it possible to find out how much free space is left on the disk where the shared disk is located?
Here is an example with DriveInfo:
using System; using System.IO; class Info { public static void Main() { DriveInfo[] drives = DriveInfo.GetDrives(); foreach (DriveInfo drive in drives) { //There are more attributes you can use. //Check the MSDN link for a complete example. Console.WriteLine(drive.Name); if (drive.IsReady) Console.WriteLine(drive.TotalSize); } } } Source: https://ru.stackoverflow.com/questions/514009/
All Articles