Get the basename part of a pathname
String_Type path_basename (String_Type path)
The path_basename
function returns the basename associated
with the path
parameter. The basename is the non-directory
part of the filename, e.g., on unix c
is the basename of
/a/b/c
.
path_dirname, path_extname, path_concat, path_is_absolute
Combine elements of a pathname
String_Type path_concat (String_Type dir, String_Type basename)
The path_concat
function combines the arguments dir
and
basename
to produce a pathname. For example, on unix is
dir
is x/y
and basename
is z
, then the
function will return x/y/z
.
path_dirname, path_basename, path_extname, path_is_absolute
Get the directory name part of a pathname
String_Type path_dirname (String_Type path)
The path_dirname
function returns the directory name
associated with a specified pathname.
On systems that include a drive specifier as part of the pathname, the value returned by this function will include the driver specifier.
path_basename, path_extname, path_concat, path_is_absolute
Return the extension part of a pathname
String_Type path_extname (String_Type path)
The path_extname
function returns the extension portion of a
specified pathname. If an extension is present, this function will
also include the dot as part of the extension, i.e., if path
is file.c
, then this function returns ".c"
. If no
extension is present, the function returns an empty string ""
.
Under VMS, the file version number is not returned as part of the extension.
path_sans_extname, path_dirname, path_basename, path_concat, path_is_absolute
Determine whether or not a pathname is absolute
Int_Type path_is_absolute (String_Type path)
The path_is_absolute
function will return non-zero is
path
refers to an absolute pathname, otherwise it returns zero.
path_dirname, path_basename, path_extname, path_concat
Strip the extension from a pathname
String_Type path_sans_extname (String_Type path)
The path_sans_extname
function removes the file name extension
(including the dot) from the path and returns the result.
path_extname, path_basename, path_dirname, path_concat