public AppDrive GetDrive(string path)
        {
            DriveInfo systemDrive = new DriveInfo(System.IO.Path.GetPathRoot(path));

            AppDrive drive = new AppDrive();
            drive.DriveName = systemDrive.Name;
            drive.AvailableFreeSpace = systemDrive.AvailableFreeSpace;

            return drive;
        }
 public IEnumerable<AppDrive> GetDrives()
 {
     foreach (DriveInfo systemDrive in DriveInfo.GetDrives())
     {
         if (systemDrive.IsReady)
         {
             AppDrive drive = new AppDrive();
             drive.AvailableFreeSpace = systemDrive.AvailableFreeSpace;
             drive.DriveName = systemDrive.Name;
             yield return drive;
         }
     }
 }