Can be combined, as there is no use for both. In most cases the space usage is required, so the drive usage can be cached for performance reasons (maybe at later point in time).
Current:
struct OCCORE_EXPORT DriveInfo { std::string DriveName = "?"; std::string DrivePath = "?"; unsigned long long UsedSpace = 0; unsigned long long TotalSpace = 0; std::string SpaceUnit = "?"; };
Possible rework:
class OCCORE_EXPORT PathInfo { std:string Path = "?"; std::string DriveName = "?"; std::string DrivePath = "?"; unsigned long long UsedSpace = 0; unsigned long long TotalSpace = 0; // Should always be in bytes, or any other common unit in the future // Conversion should be done by the UI //std::string SpaceUnit = "?"; public: // Constructor // Getters and Setters };