Lua: Add FS.GetParentFolder

This commit is contained in:
Lion Kortlepel
2021-09-20 23:43:54 +02:00
parent 908f67a799
commit 23ffa25d78
3 changed files with 6 additions and 0 deletions

View File

@@ -319,3 +319,7 @@ std::string LuaAPI::FS::GetFilename(const std::string& Path) {
std::string LuaAPI::FS::GetExtension(const std::string& Path) {
return fs::path(Path).extension().string();
}
std::string LuaAPI::FS::GetParentFolder(const std::string& Path) {
return fs::relative(Path).parent_path().string();
}