SYNOPSIS
#include <unistd.h>
char *getcwd(char *buf, size_t size);
DESCRIPTION
The
PARAMETERS
- buf
-
Points to the buffer to copy the current working directory to, or NULL if
getcwd() should allocate the buffer. - size
-
Is the size, in bytes, of the array of characters that buf points to.
RETURN VALUES
If successful,
- EACCES
-
A parent directory cannot be read to get its name.
Read or search permission was denied for a component of the path name.
- EINVAL
-
The size parameter is zero, and the buf parameter is a non-null pointer.
- ENOMEM
-
Insufficient memory exists to allocate a buffer to hold the path name.
- ERANGE
-
size is less than 0 or is greater than zero but less than the length of the path name plus 1.
CONFORMANCE
POSIX.1 (1996).
MULTITHREAD SAFETY LEVEL
MT-Safe.
PORTING ISSUES
The returned path name is in NuTCRACKER Platform format.
You can use
AVAILABILITY
MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Functions:
_NutPathToWin32() ,_NutPathToWin32FS() ,free() ,malloc()
MKS Toolkit 9.3 Documentation Build 6.