This commit is contained in:
2024-10-23 18:29:52 +02:00
parent 95478134dd
commit 6e2f80d8ce
26 changed files with 232 additions and 290 deletions

View File

@@ -274,8 +274,15 @@ bool saveDemoFile(const std::string &file_path, const DemoData &dd)
}
#endif // RECORDING
// Obtiene el nombre de un fichero a partir de una ruta
// Obtiene el nombre de un fichero a partir de una ruta completa
std::string getFileName(const std::string &path)
{
return std::filesystem::path(path).filename().string();
}
// Obtiene la ruta eliminando el nombre del fichero
std::string getPath(const std::string &full_path)
{
std::filesystem::path path(full_path);
return path.parent_path().string();
}