Manual pages › BSD C library (3B)
getwd(3B)
get current working directory pathname
From the original Amiga UNIX 2.1 manual. Some things it mentions may not be in this release.
NAME
getwd - get current working directory pathname
SYNOPSIS
cc [ flag... ] file ... -lucb #include <sys/param.h> char *getwd(pathname) char pathname[MAXPATHLEN];
DESCRIPTION
getwd copies the absolute pathname of the current working directory to pathname and returns a pointer to the result.
RETURN VALUE
getwd returns zero and places a message in pathname if an error occurs.
SEE ALSO
getcwd(3C) in the Programmer's Reference Manual.