Gets current directory path name.
#include <unistd.h> char *getwd (PathName) char *PathName;
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 PATH_MAX value, as specified in the limits.h file.
PathName | Points to the full path name. |
If the call to the getwd subroutine is successful, a pointer to the absolute path name of the current directory is returned. If an error occurs, the getwd subroutine returns a null value and places an error message in the PathName parameter.
This subroutine is part of Base Operating System (BOS) Runtime.
The getcwd subroutine.
Files, Directories, and File Systems for Programmers in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.