basename

fnstring basename(string fileName)

Gets the name of the file without any leading directory components. It returns a pointer into the given file name string.

Parameters

fileNamethe name of the file

Returns

the name of the file without any leading

directory components

Deprecated

Use glib.global.pathGetBasename instead, but notice

that glib.global.pathGetBasename allocates new memory for the returned string, unlike this function which returns a pointer into the argument.