sysupdater: don't do unnecessary work when parsing update
This commit is contained in:
@@ -18,6 +18,16 @@
|
||||
|
||||
namespace ams::mitm::sysupdater {
|
||||
|
||||
class PathView {
|
||||
private:
|
||||
std::string_view path; /* Nintendo uses util::string_view here. */
|
||||
public:
|
||||
PathView(std::string_view p) : path(p) { /* ...*/ }
|
||||
bool HasPrefix(std::string_view prefix) const;
|
||||
bool HasSuffix(std::string_view suffix) const;
|
||||
std::string_view GetFileName() const;
|
||||
};
|
||||
|
||||
Result MountSdCardContentMeta(const char *mount_name, const char *path);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user