getwd()

get path name of current working directory 

Function


SYNOPSIS

#include <unistd.h>

char *getwd(char *path_name);


DESCRIPTION

The getwd() function determines an absolute path name of the current working directory of the calling process, and copies that path name into the array pointed to by the path_name argument.


PARAMETERS

path_name 

Points to the buffer that is to hold the returned path.


RETURN VALUES

Upon successful completion, a pointer to the string containing the absolute path name of the current working directory is returned. Otherwise, getwd() returns a null pointer and the contents of the array pointed to by path_name are undefined.

If the length of the path name of the current working directory is greater than PATH_MAX+1 including the null byte, getwd() fails and returns a null pointer.


CONFORMANCE

UNIX 98.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

Use getcwd(). Use one of the _NutPathTo() family of functions to convert the returned path.


AVAILABILITY

MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
_NutPathToNutc(), _NutPathToWin32(), _NutPathToWin32FS(), getcwd()


MKS Toolkit 9.2 Documentation Build 16.