Chapter Contents

Previous

Next
getcwd

getcwd



Determine Working Directory Pathname

Portability: POSIX.1 conforming, UNIX compatible


SYNOPSIS
DESCRIPTION
RETURN VALUE
IMPLEMENTATION
EXAMPLE
RELATED FUNCTIONS
SEE ALSO


SYNOPSIS

#include <unistd.h>

char *getcwd(char *buffer, int size);


DESCRIPTION

getcwd finds the pathname of the working USS directory. buffer is the buffer in which this information is stored. The size of buffer must be large enough to hold the pathname and a terminating null. size is the number of characters in the buffer area.


RETURN VALUE

getcwd returns a pointer to the buffer if successful and a NULL pointer if not successful.


IMPLEMENTATION

When getcwd is called in a program that is not compiled under POSIX, the returned directory name includes an "hfs:" style prefix.


EXAMPLE

See the example for chdir.


RELATED FUNCTIONS

chdir


SEE ALSO


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.