Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature_fixcpp/sys/man/2/getwd – Rev 34

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
.TH GETWD 2
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 /sys/src/libc/9sys/getwd.c
25
.SH "SEE ALSO"
26
.IR pwd (1),
27
.IR fd2path (2)
28
.SH DIAGNOSTICS
29
On error, zero is returned.
30
.IR Errstr (2)
31
may be consulted for more information.
32
.SH BUGS
33
Although the name returned by
34
.I getwd
35
is guaranteed to be the path used to reach the directory,
36
if the name space has changed underfoot, the name may be
37
incorrect.