Files
simian/include/PhysFSManager.h
T
nick 5e00d8c2ec
CI / build-and-test (push) Successful in 2m18s
Sync Docs to Gitea Wiki / Sync docs to Gitea wiki (push) Successful in 11s
feat: added kv store, correct file permissions
2026-03-13 12:31:33 +13:00

38 lines
1014 B
C++

#pragma once
#include <string>
#include <vector>
#include <cstdint>
struct PHYSFS_File;
namespace PhysFSManager {
bool Initialize(const char* argv0);
bool IsInitialized();
void Shutdown();
bool MountPath(const std::string& path, const std::string& mountPoint, bool append = true);
bool UnmountPath(const std::string& path);
void ClearSearchPath();
bool SetWriteDir(const std::string& path);
bool EnsureDir(const std::string& path);
void SetEditorEnabled(bool enabled);
bool Exists(const std::string& path);
bool IsDirectory(const std::string& path);
std::string GetRealDir(const std::string& path);
std::int64_t GetModTime(const std::string& path);
std::vector<std::string> ListFiles(const std::string& path);
bool ReadTextFile(const std::string& path, std::string& out);
bool WriteTextFile(const std::string& path, const std::string& contents);
PHYSFS_File* OpenRead(const std::string& path);
PHYSFS_File* OpenWrite(const std::string& path);
void Close(PHYSFS_File* file);
} // namespace PhysFSManager