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
Path names are returned as multibyte sequences and are converted from Unicode (UTF-16)
before returning from Win32. The conversion is either performed based on the
current thread locale, set using
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Functions:
_NutPathToWin32() ,_NutPathToWin32FS() ,free() ,malloc() ,xlocale()
PTC MKS Toolkit 10.4 Documentation Build 39.