sysupdater: don't do unnecessary work when parsing update

This commit is contained in:
Michael Scire 2020-06-26 05:05:24 -07:00 committed by SciresM
parent 3324dd52ef
commit 1bc271bab1
3 changed files with 124 additions and 32 deletions

View file

@ -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);
}