Well it can get kind of hairy if you're expecting whatever tokens you find to be files. fopen() doesn't cope with directories. Just try it yourself and see.
But, just to illustrate...
See how it can appear to be correct?
int main( void )
char dir = "a/sample/directory";
char file = "a/sample/file.txt";
if ( (token = strrchr( dir, '/' )) != NULL )
printf( "filepath=%s, *token=%c, token=%s\n", dir, *token, token );
if ( (token = strrchr( file, '/' )) != NULL )
printf( "filepath=%s, *token=%c, token=%s\n", file, *token, token );