initial commit

This commit is contained in:
2024-05-17 21:40:15 +08:00
commit 8c5bae544a
7 changed files with 720 additions and 0 deletions

21
os_utils.h Normal file
View File

@@ -0,0 +1,21 @@
//
// Created on 2024-05-17.
//
#ifndef NANDPARTITIONTABLECONVERT_OS_UTILS_H
#define NANDPARTITIONTABLECONVERT_OS_UTILS_H
#include <cstdint>
#include <string>
#include <vector>
#include <cstddef>
#include <string_view>
#include <span>
bool ReadFile(std::string_view path, std::vector<uint8_t>& out, size_t maxSize, int& errorCode);
bool WriteFile(std::string_view path, std::span<const uint8_t> data, int& errorCode);
std::string GetErrorMsg(int errorCode);
#endif //NANDPARTITIONTABLECONVERT_OS_UTILS_H