#include <sys/param.h>
char *realpath(path, resolved_path) char *path; char resolved_path[MAXPATHLEN];
realpath() expands all symbolic links and resolves references to '/./', '/../' and extra '/' characters in the null terminated string named by path and stores the canonicalized absolute pathname in the buffer named by resolved_path. The resulting path will have no symbolic links components, nor any '/./' or '/../' components.
realpath() returns a pointer to the resolved_path on success. On failure, it returns NULL, sets errno to indicate the error, and places in resolved_path the absolute pathname of the path component which could not be resolved.
A pathname component is longer than {NAME_MAX} (see sysconf.2v while {_POSIX_NO_TRUNC} is in effect (see pathconf.2v
It indirectly invokes the readlink(2) system call and getwd(3) library call (for relative path names), and hence inherits the possibility of hanging due to inaccessible file system resources.
Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97