aboutsummaryrefslogtreecommitdiff
path: root/man/man3/getwd.3
blob: d9aa02b1228008060f8bffbe6e426cd911bf2f6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.TH GETWD 3
.SH NAME
getwd \- get current directory
.SH SYNOPSIS
.B #include <u.h>
.br
.B #include <libc.h>
.PP
.B
char* getwd(char *buf, int size)
.SH DESCRIPTION
.I Getwd
fills
.I buf
with a null-terminated string representing the current directory
and returns
.IR buf .
.PP
.I Getwd
places no more than
.I size
bytes in the buffer provided.
.SH SOURCE
.B /usr/local/plan9/src/lib9/getwd.c
.SH "SEE ALSO"
.IR pwd (1),
.SH DIAGNOSTICS
On error, zero is returned.
.IR Errstr (3)
may be consulted for more information.