yuge overhaul, threads, hass, rewrote display, hwmons, bunc of shit
This commit is contained in:
@@ -1,6 +1,27 @@
|
||||
#ifndef UTILS_HPP
|
||||
#define UTILS_HPP
|
||||
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
#include <print>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
std::string readFile(std::string path, uint8_t trim = 0);
|
||||
std::string pNum(double num, uint8_t decs = 0);
|
||||
std::string pNum(float num, uint8_t decs = 0);
|
||||
std::string pBytes(double bytes, bool isKbytes = false);
|
||||
std::string readFile(std::string path, size_t trim = 4096);
|
||||
ssize_t readFile2(std::string path, char *buffer, size_t maxlen);
|
||||
ssize_t readFile2(const char *path, char *buffer, size_t maxlen);
|
||||
int get_val(const std::string &target, const std::string &content);
|
||||
std::string findHwmonPath(std::string module);
|
||||
std::string getFirstDir(std::string path);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user