ReXGlue SDK
Loading...
Searching...
No Matches
file.h File Reference
#include <filesystem>
#include <iosfwd>
#include <span>
#include <string>
#include <string_view>
#include <system_error>
#include <vector>
#include <rex/platform.h>
#include <rex/result.h>
#include <rex/types.h>

Go to the source code of this file.

Namespaces

namespace  rex
namespace  rex::platform

Functions

std::filesystem::path rex::platform::GetExecutablePath ()
std::filesystem::path rex::platform::GetExecutableFolder ()
std::filesystem::path rex::platform::GetLibraryFolder ()
std::filesystem::path rex::platform::GetUserFolder ()
bool rex::platform::IsPackagedApp ()
std::filesystem::path rex::platform::GetUserConfigFolder (std::string_view app_name)
std::filesystem::path rex::platform::GetAppRoot (std::string_view app_name)
bool rex::platform::IsDirectoryWritable (const std::filesystem::path &dir)
std::string rex::platform::SanitizeFolderName (std::string_view name, std::string_view fallback="default")
Result< std::vector< u8 > > rex::platform::ReadHostFile (const std::filesystem::path &path, u64 offset=0, u64 length=0)
Result< void > rex::platform::WriteHostFile (const std::filesystem::path &path, std::span< const u8 > data)
Result< void > rex::platform::WriteHostFile (const std::filesystem::path &path, std::string_view text)
std::filesystem::path rex::platform::ResolveEntryCase (const std::filesystem::path &parent, std::string_view name)
bool rex::platform::OpenStorageFile (std::fstream &file, const std::filesystem::path &path)
u64 rex::platform::GetStorageFileSize (const std::filesystem::path &path)
size_t rex::platform::ReadStorageFile (std::fstream &file, void *data, size_t size)
void rex::platform::AppendStorageFile (std::fstream &file, const void *data, size_t size)
void rex::platform::ResetStorageFile (std::fstream &file, const std::filesystem::path &path, u64 length)

Detailed Description

License
BSD 3-Clause License See LICENSE file in the project root for full license text.