diff options
author | bunnei <bunneidev@gmail.com> | 2014-11-14 01:26:33 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2014-11-18 00:42:37 +0100 |
commit | c04a04189ad9902e95d6dce5c6bb712cc8342f56 (patch) | |
tree | cb03dbf27c0480547f34ae471c5dc14228b650e7 /src/core/file_sys | |
parent | Merge pull request #201 from archshift/boss (diff) | |
download | yuzu-c04a04189ad9902e95d6dce5c6bb712cc8342f56.tar yuzu-c04a04189ad9902e95d6dce5c6bb712cc8342f56.tar.gz yuzu-c04a04189ad9902e95d6dce5c6bb712cc8342f56.tar.bz2 yuzu-c04a04189ad9902e95d6dce5c6bb712cc8342f56.tar.lz yuzu-c04a04189ad9902e95d6dce5c6bb712cc8342f56.tar.xz yuzu-c04a04189ad9902e95d6dce5c6bb712cc8342f56.tar.zst yuzu-c04a04189ad9902e95d6dce5c6bb712cc8342f56.zip |
Diffstat (limited to 'src/core/file_sys')
-rw-r--r-- | src/core/file_sys/archive.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/core/file_sys/archive.h b/src/core/file_sys/archive.h index 38145eed8..7b3130f16 100644 --- a/src/core/file_sys/archive.h +++ b/src/core/file_sys/archive.h @@ -74,6 +74,35 @@ public: return type; } + /** + * Gets the string representation of the path for debugging + * @return String representation of the path for debugging + */ + const std::string DebugStr() const { + switch (GetType()) { + case Invalid: + return "[Invalid]"; + case Empty: + return "[Empty]"; + case Binary: + { + std::stringstream res; + res << "[Binary: "; + for (unsigned byte : binary) + res << std::hex << std::setw(2) << std::setfill('0') << byte; + res << ']'; + return res.str(); + } + case Char: + return "[Char: " + AsString() + ']'; + case Wchar: + return "[Wchar: " + AsString() + ']'; + default: + ERROR_LOG(KERNEL, "LowPathType cannot be converted to string!"); + return {}; + } + } + const std::string AsString() const { switch (GetType()) { case Char: |