Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ realpath(3) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getwd(3)




realpath(3) realpath(3)
NAME realpath - returns the real filename of a file SYNOPSIS #include <sys/param.h> char *realpath(file-name, resolved-name) char *file-name; char resolved-name[MAXPATHLEN]; DESCRIPTION realpath resolves all links and references to ``.'' and ``..'' in file-name and stores the result in resolved-name. The realpath routine can handle both relative and absolute pathnames. For absolute pathnames or for a relative name whose resolved name cannot be expressed in relative terms (such as ../../foobar ), realpath returns the resolved absolute name. For the other relative pathnames, realpath returns the resolved relative name. STATUS MESSAGES AND VALUES If there is no error, realpath returns a pointer to 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. WARNINGS The realpath routine operates on NULL-terminated strings. Execute permission is required for all the directories in the given and resolved pathname. LIMITATIONS If an error occurs, realpath may fail to return to the current directory. SEE ALSO getwd(3) January 1992 1

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