![]() |
Pioneer
|
Classes | |
| class | FileData |
| class | FileDataMalloc |
| class | FileEnumerator |
| class | FileInfo |
| class | FileSource |
| class | FileSourceFS |
| class | FileSourceUnion |
| class | FileSourceZip |
Enumerations | |
| enum class | CopyMode { OVERWRITE , ONLY_MISSING_IN_TARGET } |
Functions | |
| std::string | SanitiseFileName (const std::string &a) |
| std::string | JoinPath (const std::string &a, const std::string &b) |
| std::string | NormalisePath (const std::string &path) |
| std::string | JoinPathBelow (const std::string &base, const std::string &path) |
| std::string | GetRelativePath (const std::string &base, const std::string &path) |
| bool | CopyDir (FileSource &sourceFS, std::string sourceDir, FileSourceFS &targetFS, std::string targetDir, FileSystem::CopyMode copymode) |
| void | Init () |
| void | Uninit () |
| std::string | GetUserDir () |
| std::string | GetDataDir () |
Variables | |
| FileSourceUnion | gameDataFiles |
| FileSourceFS | userFiles (GetUserDir()) |
|
strong |
| bool FileSystem::CopyDir | ( | FileSource & | sourceFS, |
| std::string | sourceDir, | ||
| FileSourceFS & | targetFS, | ||
| std::string | targetDir, | ||
| CopyMode | copymode = CopyMode::OVERWRITE |
||
| ) |
Copy the contents of a directory from sourceFS into a directory in targetFS, according to copymode. Returns false if sourceDir or targetDir are invalid

| std::string FileSystem::GetDataDir | ( | ) |
| std::string FileSystem::GetRelativePath | ( | const std::string & | base, |
| const std::string & | path | ||
| ) |
Given a path in the form <base>/<relpath>, return <relpath>. If <base> is not the exact base of <path>, return <path> unchanged
| std::string FileSystem::GetUserDir | ( | ) |
| void FileSystem::Init | ( | ) |

| std::string FileSystem::JoinPath | ( | const std::string & | a, |
| const std::string & | b | ||
| ) |
Create path /, coping with 'a' or 'b' being empty, 'b' being an absolute path, or 'a' not having a trailing separator
| std::string FileSystem::JoinPathBelow | ( | const std::string & | base, |
| const std::string & | path | ||
| ) |
Create path <base>/<path> ensuring that the result points to a path at or below <base> throws an exception (std::invalid_argument) if the path tries to escape <base> must not be empty
| std::string FileSystem::NormalisePath | ( | const std::string & | path | ) |
Collapse redundant path separators, and '.' and '..' components NB: this does not interpret symlinks, so the result may refer to an entirely different file than the input throws std::invalid_argument if the input path resolves to a 'negative' path (e.g., "a/../.." resolves to a negative path)
| std::string FileSystem::SanitiseFileName | ( | const std::string & | a | ) |
Makes a string safe for use as a file name warning: this mapping is non-injective, that is, multiple input names may produce the same output
| void FileSystem::Uninit | ( | ) |
| FileSourceUnion FileSystem::gameDataFiles |
| FileSourceFS FileSystem::userFiles | ( | GetUserDir() | ) |