27 lines
581 B
C
27 lines
581 B
C
|
#pragma once
|
||
|
#include "scannersysinfo.h"
|
||
|
#include "json.hpp"
|
||
|
|
||
|
using json=nlohmann::json;
|
||
|
|
||
|
struct fileSystem_info{
|
||
|
char fileSystem_format[8];
|
||
|
unsigned int fileSystem_total_capacity;
|
||
|
unsigned int fileSystem_free_capacity;
|
||
|
char fileSystem_permissions[3];
|
||
|
};
|
||
|
|
||
|
|
||
|
class SysInforTool
|
||
|
{
|
||
|
public:
|
||
|
SysInforTool(ScannerSysInfo tinfo);
|
||
|
~SysInforTool();
|
||
|
std::string GetSysInfo();
|
||
|
private:
|
||
|
int get_fileSystem_info(const char *fileSystem_name,struct fileSystem_info *fi);
|
||
|
void struct2json(json& j,ScannerSysInfo& info);
|
||
|
private:
|
||
|
ScannerSysInfo m_sysinfo;
|
||
|
};
|