getwd - Get current directory pathname
char *path_name );
Standard C Library (libc)
Interfaces documented on this reference page conform to
industry standards as follows:
Refer to the standards(5) reference page for more information
about industry standards and associated tags.
Points to the full pathname.
The getwd() function determines the absolute pathname of
the current directory, then copies that pathname into the
array pointed to by the path_name parameter.
The maximum pathname length, in characters, is set by the
PATH_MAX definition, as specified in the limits.h file.
If the length of the pathname of the current directory is
greater than (PATH_MAX + 1), including the null byte,
getwd() fails and returns a null pointer.
Upon successful completion, a pointer to the absolute
pathname of the current directory is returned. If an error
occurs, the getwd() function returns a null pointer. and
places a message in the path_name parameter.
[ Back ]