libnick 2024.12.0
A cross-platform base for native Nickvision applications.
|
Functions | |
std::string | getLastSystemError () |
Get the last system api call error message. | |
std::vector< std::byte > | readFileBytes (const std::filesystem::path &path) |
Reads a file as a vector of bytes. | |
template<typename T > | |
const T & | unmove (T &&t) |
Unmoves a value. | |
bool | writeFileBytes (const std::filesystem::path &path, const std::vector< std::byte > &bytes, bool overwrite=true) |
Writes a vector of bytes to a file. | |
std::string Nickvision::Helpers::CodeHelpers::getLastSystemError | ( | ) |
Get the last system api call error message.
std::vector< std::byte > Nickvision::Helpers::CodeHelpers::readFileBytes | ( | const std::filesystem::path & | path | ) |
Reads a file as a vector of bytes.
path | The path to the file |
const T & Nickvision::Helpers::CodeHelpers::unmove | ( | T && | t | ) |
Unmoves a value.
t | An rvalue of T |
bool Nickvision::Helpers::CodeHelpers::writeFileBytes | ( | const std::filesystem::path & | path, |
const std::vector< std::byte > & | bytes, | ||
bool | overwrite = true ) |
Writes a vector of bytes to a file.
path | The path to the file |
bytes | The bytes to write |
overwrite | Whether or not to overwrite the file if it already exists |