Add GetFilename, GetExtension,

This commit is contained in:
Lion Kortlepel
2021-09-20 22:45:12 +02:00
parent 32756ccc4a
commit 27b5c6d850
5 changed files with 110 additions and 2 deletions

View File

@@ -311,3 +311,11 @@ std::pair<bool, std::string> LuaAPI::FS::Copy(const std::string& Path, const std
bool LuaAPI::FS::Exists(const std::string& Path) {
return fs::exists(fs::relative(Path));
}
std::string LuaAPI::FS::GetFilename(const std::string& Path) {
return fs::path(Path).filename().string();
}
std::string LuaAPI::FS::GetExtension(const std::string& Path) {
return fs::path(Path).extension().string();
}