realpath — resolve pathname
char *realpath(const char *file_name__restrict fP,
function derives, from the pathname pointed to by
an absolute pathname that names the same file, whose resolution does not
or symbolic links. The generated pathname is stored, up to
a maximum of
bytes, in the buffer pointed to by
On successful completion,
returns a pointer to the resolved name. Otherwise,
returns a null pointer and sets
to indicate the error, and the
contents of the buffer pointed to by
function will fail if:
Read or search permission was denied for a component of
argument is a null pointer.
An error occurred while reading from the file system.
Too many symbolic links were encountered in resolving
argument is longer than
or a pathname component is longer than
A component of
does not name an existing file
points to an empty string.
A component of the path prefix is not a directory.
function may fail if:
Pathname resolution of a symbolic link produced an intermediate result whose
Insufficient storage space is available.
First released in Issue 4, Version 2.