38 lines
1014 B
C++
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
|