Index of Section 3 Manual Pages

Interix / SUArealpath.3Interix / SUA

realpath(3)                                                 realpath(3)

  realpath

  NAME

    realpath() - resolve pathnames

  SYNOPSIS

    #include 

    char * realpath(const char *path, char *resolved)

  DESCRIPTION

    The realpath(3) call takes a path as an argument and returns (in the
    resolved buffer) the actual path. It resolves multiple concurrent slashes,
    directory components such as . and .. and symbolic links. It resolves the
    path by executing chdir(2) and stat(2).

    The realpath(3) call takes the following arguments:

    path
        A buffer containing the path name to be resolved.

    resolved
        A buffer to contain the resolved path name. The buffer is assumed to
        be at least {PATH_MAX} bytes in size.

  RETURN VALUES

    On success, the realpath(3) call returns a pointer to resolved; on
    failure, it returns NULL and sets errno to indicate the error. The
    resolved buffer will contain the intermediate pathname which caused the
    error.

  ERRORS

    The realpath(3) call can fail for the following reasons:

    [EINVAL]
        Either path or resolved was NULL.

    [ELOOP]
        The pathname in path involved a links in a loop.

    [ENAMETOOLONG]
        The resolved pathname would have been more than {PATH_MAX} characters
        long.

    [ENOENT]
        The path was invalid.

  SEE ALSO

    chdir(2)

    stat(2)

  USAGE NOTES

    The realpath function is thread safe.

    The realpath function is not async-signal safe.


Interix / SUAHosted at SUA Community for Interix, SUA and SFUInterix / SUA