class
FFileHelper
Whole-file reads and writes on the native file system (not the VFS): logs, manifests and editor side files. Binary mode, so text comes back byte for byte, CRLF included. Game assets load through the VFS instead.
- Module
- Core
- Header
#include "Core/FileHelper.h"- Namespace
Mowo
Public functions
| Returns | Name | Description |
|---|---|---|
bool | LoadFileToString | False on open failure; the output is cleared in that case. |
bool | LoadFileToBytes | |
std::string | LoadFileToString | Empty on a missing or unreadable file. |
std::vector<uint8_t> | LoadFileToArray | |
bool | SaveStringToFile | Atomic replace; creates the parent directories. |
bool | SaveBytesToFile | |
bool | FileExists | |
int64_t | FileSize | |
bool | DirectoryExists | |
bool | CreateDirectories | |
bool | Remove | |
bool | Move | |
bool | Copy | |
int64_t | GetLastWriteTime | -1 when missing. |
std::vector<FDirectoryEntry> | ListDirectory |
Function details
LoadFileToString
C++
static bool LoadFileToString(std::string& outContents, const std::filesystem::path& path)False on open failure; the output is cleared in that case.
LoadFileToBytes
C++
static bool LoadFileToBytes(std::vector<uint8_t>& outBytes, const std::filesystem::path& path)LoadFileToString
C++
static std::string LoadFileToString(const std::filesystem::path& path)Empty on a missing or unreadable file.
LoadFileToArray
C++
static std::vector<uint8_t> LoadFileToArray(const std::filesystem::path& path)SaveStringToFile
C++
static bool SaveStringToFile(const std::string& contents, const std::string& path)Atomic replace; creates the parent directories.
SaveBytesToFile
C++
static bool SaveBytesToFile(const std::vector<uint8_t>& bytes, const std::string& path)FileExists
C++
static bool FileExists(const std::string& path)FileSize
C++
static int64_t FileSize(const std::string& path)DirectoryExists
C++
static bool DirectoryExists(const std::string& path)CreateDirectories
C++
static bool CreateDirectories(const std::string& path)Remove
C++
static bool Remove(const std::string& path)Move
C++
static bool Move(const std::string& from, const std::string& to)Copy
C++
static bool Copy(const std::string& from, const std::string& to)GetLastWriteTime
C++
static int64_t GetLastWriteTime(const std::string& path)-1 when missing.
ListDirectory
C++
static std::vector<FDirectoryEntry> ListDirectory(const std::string& path, bool recursive = false)Generated from Core/FileHelper.h via core.json · Nov 5, 2026Version 1.0.0