Skip to content

C++ abstraction on windows functions GetLogicalDrives, GetDiskFreeSpace[Ex], QueryDosDevice, and GetDriveType, etc.

License

Notifications You must be signed in to change notification settings

averkhaturau/WinDrivesInfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WinDrivesInfo

Header-only very small C++ library, providing info of Windows disk drives.

It's a C++ abstraction on Windows functions GetLogicalDrives, GetDiskFreeSpace[Ex], QueryDosDevice, and GetDriveType.

Usage example 1:

  #include "EnumDrives.h"
  //...
  enumDrives([](const char* drive) {std::cout << drive << "\n;});

Usage example 2:

  #include "DriveInfo.h"
  //...
  const auto driveInfo = DriveInfo("C:");
  std::cout << driveInfo.dosDeviceName()
            << " has "
            << driveInfo.discSpaceInfo().totalFreeBytes
            << " free of "
            << driveInfo.discSpaceInfo().totalBytes
            << "\n";

About

C++ abstraction on windows functions GetLogicalDrives, GetDiskFreeSpace[Ex], QueryDosDevice, and GetDriveType, etc.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published