Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ realpath(3C) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getcwd(3C)






       realpath(3C)                                            realpath(3C)


       NAME
             realpath - returns the real file name

       SYNOPSIS
             #include <stdlib.h>
             #include <sys/param.h>
             char *realpath (const char *file_name, char *resolved_name);

       DESCRIPTION
             realpath resolves all links, symbolic links, and references to
             ``.'' and ``..'' in file_name and stores it in resolved_name.

             It can handle both relative and absolute path names.  For
             absolute path names and the relative names whose resolved name
             cannot be expressed relatively (for example, ../../reldir), it
             returns the resolved absolute name.  For the other relative
             path names, it returns the resolved relative name.

             resolved_name must be big enough (MAXPATHLEN) to contain the
             fully resolved path name.

          Return Values
             If there is no error, realpath returns a pointer to the
             resolved_name.  Otherwise it returns a null pointer and places
             the name of the offending file in resolved_name.  The global
             variable errno is set to indicate the error.

       REFERENCES
             getcwd(3C)

       NOTICES
             realpath operates on null-terminated strings.

             One should have execute permission on all the directories in
             the given and the resolved path.

             realpath may fail to return to the current directory if an
             error occurs.










                           Copyright 1994 Novell, Inc.               Page 1








Typewritten Software • bear@typewritten.org • Edmonds, WA 98026