rsc | cfa37a7 | 2004-04-10 18:53:55 +0000 | [diff] [blame] | 1 | .TH GETWD 3 |
| 2 | .SH NAME |
| 3 | getwd \- get current directory |
| 4 | .SH SYNOPSIS |
| 5 | .B #include <u.h> |
| 6 | .br |
| 7 | .B #include <libc.h> |
| 8 | .PP |
| 9 | .B |
| 10 | char* getwd(char *buf, int size) |
| 11 | .SH DESCRIPTION |
| 12 | .I Getwd |
| 13 | fills |
| 14 | .I buf |
| 15 | with a null-terminated string representing the current directory |
| 16 | and returns |
| 17 | .IR buf . |
| 18 | .PP |
| 19 | .I Getwd |
| 20 | places no more than |
| 21 | .I size |
| 22 | bytes in the buffer provided. |
| 23 | .SH SOURCE |
rsc | c3674de | 2005-01-11 17:37:33 +0000 | [diff] [blame] | 24 | .B \*9/src/lib9/getwd.c |
rsc | cfa37a7 | 2004-04-10 18:53:55 +0000 | [diff] [blame] | 25 | .SH "SEE ALSO" |
rsc | c8b6342 | 2005-01-13 04:49:19 +0000 | [diff] [blame] | 26 | .IR pwd (1) |
rsc | cfa37a7 | 2004-04-10 18:53:55 +0000 | [diff] [blame] | 27 | .SH DIAGNOSTICS |
| 28 | On error, zero is returned. |
rsc | bf8a59f | 2004-04-11 03:42:27 +0000 | [diff] [blame] | 29 | .IR Errstr (3) |
rsc | cfa37a7 | 2004-04-10 18:53:55 +0000 | [diff] [blame] | 30 | may be consulted for more information. |
rsc | c8b6342 | 2005-01-13 04:49:19 +0000 | [diff] [blame] | 31 | .SH BUGS |
| 32 | To avoid name conflicts with the underlying system, |
| 33 | .I getwd |
| 34 | is a preprocessor macro defined as |
| 35 | .IR p9getwd ; |
| 36 | see |
| 37 | .IR intro (3). |