getwd
Purpose
Gets current directory path name.
Library
Berkeley Library (libbsd.a)
Syntax
char *getwd (pathname)
char *pathname;
Description
The getwd subroutine determines the absolute path name of
the current directory, then copies that path name into
the area pointed to by the pathname parameter.
The maximum path name length, in characters, is set by
the MAXPATHLEN define, as specified in the file
bsd/sys/param.h.
Unlike the getcwd subroutine, the getwd subroutine does
not require an additional process slot.
Return Value
If the call to getwd is successful, a pointer to the
absolute path name of the current directory is returned.
If an error occurs, getwd returns the value 0 and places
a message in pathname.
Related Information
In this book: "getcwd."