 |
Index for Section 3 |
|
 |
Alphabetical listing for R |
|
 |
Bottom of page |
|
realpath(3)
NAME
realpath - Resolve pathname
SYNOPSIS
#include <stdlib.h>
char *realpath(
const char *file_name,
char *resolved_name );
STANDARDS
Interfaces documented on this reference page conform to industry standards
as follows:
realpath(): POSIX.1, XPG4-UNIX
Refer to the standards(5) reference page for more information about
industry standards and associated tags.
DESCRIPTION
The realpath() function derives, from the file pointed to by file_name, an
absolute pathname that names the same file, whose resolution does not
involve ".", "..", or symbolic links. The generated pathname is stored, up
to a maximum of PATH_MAX bytes, in the buffer pointed to by resolved_name.
RETURN VALUES
Upon successful completion, the realpath() function returns a pointer to
the resolved name. Otherwise, realpath() returns a null pointer and sets
errno to indicate the error, and the contents of the buffer pointed to by
resolved_name are undefined.
ERRORS
If the realpath() function fails, errno may be set to one of the following
values:
[EACCES]
Read or search permission was denied for a component of file_name.
[EINVAL]
Either the file_name or resolved_name argument is a null pointer.
[EIO]
An error occurred while reading from the file system.
[ELOOP]
Too many symbolic links were encountered in resolving path.
[ENAMETOOLONG]
The file_name argument is longer than PATH_MAX or a pathname component
is longer than NAME_MAX.
[ENOENT]
A component of file_name does not name an existing file or file_name
points to an empty string.
[ENOMEM]
Insufficient storage space available.
[ENOTDIR]
A component of either path prefix is not a directory.
SEE ALSO
Functions: getcwd(3), sysconf(3)
Standards: standards(5)
 |
Index for Section 3 |
|
 |
Alphabetical listing for R |
|
 |
Top of page |
|