Blob


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
24 .B /usr/local/plan9/src/lib9/getwd.c
25 .SH "SEE ALSO"
26 .IR pwd (1),
27 .SH DIAGNOSTICS
28 On error, zero is returned.
29 .IR Errstr (3)
30 may be consulted for more information.