initial commit
This commit is contained in:
21
os_utils.h
Normal file
21
os_utils.h
Normal 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
|
||||
Reference in New Issue
Block a user