DIRNAME(3)

NAME
dirname - determine name of containing directory

SYNOPSIS
#include <libgen.h>
char *dirname(char *path);

DESCRIPTION
The dirname function returns the name of the directory containing path. If the path does not contain slashes, the string "." is returned. Trailing slashes are ignored.

SEE ALSO
basename(3).

NOTES
This function may, but need not, overwrite the buffer passed to it. Although MINIX' implementation of this function is re-entrant, POSIX does not guarantee this property and portable programs should not rely on it.