path_get_basename helper function

This commit is contained in:
Jasmine Iwanek
2025-09-09 19:37:41 -04:00
parent 6f9930417d
commit af007b12e7
3 changed files with 11 additions and 2 deletions

View File

@@ -267,6 +267,13 @@ plat_getcwd(char *bufp, int max)
return 0;
}
char *
path_get_basename(const char *path)
{
QFileInfo fi(path);
return fi.fileName().toUtf8().data();
}
void
path_get_dirname(char *dest, const char *path)
{