Blob
1 .TH GETWD 32 .SH NAME3 getwd \- get current directory4 .SH SYNOPSIS5 .B #include <u.h>6 .br7 .B #include <libc.h>8 .PP9 .B10 char* getwd(char *buf, int size)11 .SH DESCRIPTION12 .I Getwd13 fills14 .I buf15 with a null-terminated string representing the current directory16 and returns17 .IR buf .18 .PP19 .I Getwd20 places no more than21 .I size22 bytes in the buffer provided.23 .SH SOURCE24 .B /usr/local/plan9/src/libc/9sys/getwd.c25 .SH "SEE ALSO"26 .IR pwd (1),27 .IR fd2path (3)28 .SH DIAGNOSTICS29 On error, zero is returned.30 .IR Errstr (3)31 may be consulted for more information.32 .SH BUGS33 Although the name returned by34 .I getwd35 is guaranteed to be the path used to reach the directory,36 if the name space has changed underfoot, the name may be37 incorrect.