Helios Engine 0.1.0
A modular ECS based data-oriented C++23 game engine
 
Loading...
Searching...
No Matches
filesystem.hpp File Reference
#include <helios/core_pch.hpp>
#include <cstddef>
#include <cstdint>
#include <expected>
#include <filesystem>
#include <fstream>
#include <ios>
#include <string>
#include <string_view>

Go to the source code of this file.

Namespaces

namespace  helios
 
namespace  helios::utils
 

Enumerations

enum class  helios::utils::FileError : uint8_t { helios::utils::kCouldNotOpen , helios::utils::kReadError }
 

Functions

constexpr std::string_view helios::utils::FileErrorToString (FileError error) noexcept
 Converts FileError to a human-readable string.
 
auto helios::utils::ReadFileToString (std::string_view filepath) -> std::expected< std::string, FileError >
 Reads the entire contents of a file into a string.
 
auto helios::utils::ReadFileToString (const std::filesystem::path &filepath) -> std::expected< std::string, FileError >
 Reads the entire contents of a file into a string.
 
constexpr std::string_view helios::utils::GetFileName (std::string_view path)
 Extracts the file name from a given path.
 
static constexpr std::string_view helios::utils::GetFileExtension (std::string_view path)
 Extracts the file extension from a given path.