 | | When called, getcwd determines the absolute pathname of the current working directory and places it into the character string pointed to by buf, whose size is given by size. If buf is the null pointer, getcwd allocates a string with malloc (see Chapter 2, Utility Routines), copies the pathname to it, and returns a pointer to the allocated string. If buf is not large enough or some other error occurs, getcwd returns the predefined constant NULL. | |
|