ToobPlayer UI. .mdata file handling.
This commit is contained in:
@@ -309,6 +309,10 @@ namespace pipedal
|
||||
const_iterator begin() const { return values.begin(); }
|
||||
const_iterator end() const { return values.end(); }
|
||||
|
||||
iterator erase(iterator it)
|
||||
{
|
||||
return values.erase(it);
|
||||
}
|
||||
iterator find(const std::string &key);
|
||||
const_iterator find(const std::string &key) const;
|
||||
|
||||
|
||||
@@ -119,6 +119,8 @@ namespace pipedal
|
||||
std::filesystem::path MakeRelativePath(const std::filesystem::path &path, const std::filesystem::path&parentPath);
|
||||
|
||||
bool IsSubdirectory(const std::filesystem::path &path, const std::filesystem::path &basePath);
|
||||
bool HasDotDot(const std::filesystem::path &path);
|
||||
|
||||
|
||||
std::string ToLower(const std::string&value);
|
||||
|
||||
|
||||
@@ -190,6 +190,22 @@ std::filesystem::path pipedal::MakeRelativePath(const std::filesystem::path &pat
|
||||
|
||||
}
|
||||
|
||||
bool pipedal::HasDotDot(const std::filesystem::path &path)
|
||||
{
|
||||
for (auto &part : path)
|
||||
{
|
||||
if (part == "..")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (part == ".")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool pipedal::IsSubdirectory(const std::filesystem::path &path, const std::filesystem::path &basePath)
|
||||
{
|
||||
auto iPath = path.begin();
|
||||
|
||||
Reference in New Issue
Block a user