summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2014-11-13 19:26:33 -0500
committerGravatar bunnei2014-11-17 18:42:37 -0500
commitc04a04189ad9902e95d6dce5c6bb712cc8342f56 (patch)
treecb03dbf27c0480547f34ae471c5dc14228b650e7 /src
parentMerge pull request #201 from archshift/boss (diff)
downloadyuzu-c04a04189ad9902e95d6dce5c6bb712cc8342f56.tar.gz
yuzu-c04a04189ad9902e95d6dce5c6bb712cc8342f56.tar.xz
yuzu-c04a04189ad9902e95d6dce5c6bb712cc8342f56.zip
FileSys: Added DebugStr method to Path class.
Diffstat (limited to '')
-rw-r--r--src/core/file_sys/archive.h29
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: