VMS Help
CRTL, getcwd
*Conan The Librarian
|
Returns a pointer to the file specification for the current
working directory.
Format
#include <unistd.h>
char *getcwd (char *buffer, size_t size); (ISO POSIX-1)
char *getcwd (char *buffer, unsigned int size, . . . );
(DEC C Extension)
The getcwd function has variants named _getcwd32 and _getcwd64
for use with 32-bit and 64-bit pointer sizes, respectively.
buffer
Pointer to a character string large enough to hold the directory
specification.
If buffer is a NULL pointer, getcwd obtains size bytes of space
using malloc. In this case, you can use the pointer returned by
getcwd as the argument in a subsequent call to free.
size
The length of the directory specification to be returned.
. . .
An optional argument that can be either 1 or 0. If you specify 1,
the directory specification is returned in OpenVMS format. If you
specify 0, the directory specification (pathname) is returned in
UNIX style format. If you omit this argument, getcwd returns the
filename according to your current command-language interpreter
(CLI).
x A pointer to the file specification.
NULL Indicates an error.