There should be something elegant in Linux API/POSIX to extract base file name from full path
template
charType* getFileNameFromPath( charType* path )
{
if( path == NULL )
return NULL;
charType * pFileName = path;
for( charType * pCur = path; *pCur != '\0'; pCur++)
{
if( *pCur == '/' || *pCur == '\\' )
pFileName = pCur+1;
}
return pFileName;
}
call: wchar_t * fileName = getFileNameFromPath < wchar_t > ( filePath );
(this is a c++)