blob: 245914f34e0651bc7c358a9b5fbde6070bba554b [file] [log] [blame]
rsccfa37a72004-04-10 18:53:55 +00001.TH GETWD 3
2.SH NAME
3getwd \- get current directory
4.SH SYNOPSIS
5.B #include <u.h>
6.br
7.B #include <libc.h>
8.PP
9.B
10char* getwd(char *buf, int size)
11.SH DESCRIPTION
12.I Getwd
13fills
14.I buf
15with a null-terminated string representing the current directory
16and returns
17.IR buf .
18.PP
19.I Getwd
20places no more than
21.I size
22bytes in the buffer provided.
23.SH SOURCE
rscc3674de2005-01-11 17:37:33 +000024.B \*9/src/lib9/getwd.c
rsccfa37a72004-04-10 18:53:55 +000025.SH "SEE ALSO"
rscc8b63422005-01-13 04:49:19 +000026.IR pwd (1)
rsccfa37a72004-04-10 18:53:55 +000027.SH DIAGNOSTICS
28On error, zero is returned.
rscbf8a59f2004-04-11 03:42:27 +000029.IR Errstr (3)
rsccfa37a72004-04-10 18:53:55 +000030may be consulted for more information.
rscc8b63422005-01-13 04:49:19 +000031.SH BUGS
32To avoid name conflicts with the underlying system,
33.I getwd
34is a preprocessor macro defined as
35.IR p9getwd ;
36see
37.IR intro (3).