diff options
Diffstat (limited to 'src')
| -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: | |||
| 74 | return type; | 74 | return type; |
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | /** | ||
| 78 | * Gets the string representation of the path for debugging | ||
| 79 | * @return String representation of the path for debugging | ||
| 80 | */ | ||
| 81 | const std::string DebugStr() const { | ||
| 82 | switch (GetType()) { | ||
| 83 | case Invalid: | ||
| 84 | return "[Invalid]"; | ||
| 85 | case Empty: | ||
| 86 | return "[Empty]"; | ||
| 87 | case Binary: | ||
| 88 | { | ||
| 89 | std::stringstream res; | ||
| 90 | res << "[Binary: "; | ||
| 91 | for (unsigned byte : binary) | ||
| 92 | res << std::hex << std::setw(2) << std::setfill('0') << byte; | ||
| 93 | res << ']'; | ||
| 94 | return res.str(); | ||
| 95 | } | ||
| 96 | case Char: | ||
| 97 | return "[Char: " + AsString() + ']'; | ||
| 98 | case Wchar: | ||
| 99 | return "[Wchar: " + AsString() + ']'; | ||
| 100 | default: | ||
| 101 | ERROR_LOG(KERNEL, "LowPathType cannot be converted to string!"); | ||
| 102 | return {}; | ||
| 103 | } | ||
| 104 | } | ||
| 105 | |||
| 77 | const std::string AsString() const { | 106 | const std::string AsString() const { |
| 78 | switch (GetType()) { | 107 | switch (GetType()) { |
| 79 | case Char: | 108 | case Char: |