mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
d32deab17b
Suggested by G. Brandon Robinson.
37 lines
643 B
Groff
37 lines
643 B
Groff
.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 \*9/src/lib9/getwd.c
|
|
.SH "SEE ALSO"
|
|
.MR pwd (1)
|
|
.SH DIAGNOSTICS
|
|
On error, zero is returned.
|
|
.MR Errstr (3)
|
|
may be consulted for more information.
|
|
.SH BUGS
|
|
To avoid name conflicts with the underlying system,
|
|
.I getwd
|
|
is a preprocessor macro defined as
|
|
.IR p9getwd ;
|
|
see
|
|
.MR intro (3) .
|