The
realpath()
function resolves all symbolic links, extra
"/"
characters and references to
/./
and
/../
in
pathname,
and copies the resulting absolute pathname into
the memory pointed to by
resolved_path.
The
resolved_path
argument
must
point to a buffer capable of storing at least
PATH_MAX
characters, or be
NULL.
The
realpath()
function will resolve both absolute and relative paths
and return the absolute pathname corresponding to
pathname.
All components of
pathname
must exist when
realpath()
is called, and all but the last component must name either directories or
symlinks pointing to the directories.