Files
simian/include/PhysFSManager.h
nick 3e23f7da8e
CI / build-and-test (push) Failing after 10m16s
CI / build-and-test (pull_request) Successful in 3m2s
feat: added physFS
2026-03-11 16:43:36 +13:00

37 lines
977 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);
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