char* tsmNameFromPathname ( char *pathname )

Extract the filename from a path

Documentation

Extract the filename from a path.

This routine returns the last part of a pathname, i.e. the filename or last directory name. If the pathname ends with a '/', then this is ignored. The function will always return a valid string - this will be empty if an error occurred. This string should be freed when finished with.

Returns:
the last part of the filename string, or "" if error occurred
Parameters:
pathname - a filename string
Author:
Martin Reddy
Version:
6 February 1998
See Also:
tsmAddFilenameExtension


TSMAPI_RELEASE 2.1 - Release Date: 2001/01/10 19:01:12

Back to tsmApi Home Page