getcwd - get current working directory pathname
char *getcwd(char *pathname, size_t len)
Getcwd copies the absolute pathname of the current working directory to
pathname and returns a pointer to the result. Pathname is a character
array of length len.
Getcwd returns a null pointer and sets errno if an error occurs. The
error will reflect the system call errors that may occur if the path to
the current directory is searched upwards to the root directory. The
error ERANGE is returned if the result does not fit within len bytes.