mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-03 14:26:09 +00:00
Lua: Add FS.GetParentFolder
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user