diff options
author | rsc <devnull@localhost> | 2004-04-10 18:53:55 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2004-04-10 18:53:55 +0000 |
commit | cfa37a7b1131abbab2e7d339b451f5f0e3198cc8 (patch) | |
tree | a7fe52416e9d27efe2af2d54910112674c0fd7c6 /man/man3/getwd.3 | |
parent | 08df2a433e69c94f9db002c83380cb2b693fee60 (diff) | |
download | plan9port-cfa37a7b1131abbab2e7d339b451f5f0e3198cc8.tar.gz plan9port-cfa37a7b1131abbab2e7d339b451f5f0e3198cc8.tar.bz2 plan9port-cfa37a7b1131abbab2e7d339b451f5f0e3198cc8.zip |
Lots of man pages.
Diffstat (limited to 'man/man3/getwd.3')
-rw-r--r-- | man/man3/getwd.3 | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/man/man3/getwd.3 b/man/man3/getwd.3 new file mode 100644 index 00000000..021e5cd9 --- /dev/null +++ b/man/man3/getwd.3 @@ -0,0 +1,37 @@ +.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 /sys/src/libc/9sys/getwd.c +.SH "SEE ALSO" +.IR pwd (1), +.IR fd2path (2) +.SH DIAGNOSTICS +On error, zero is returned. +.IR Errstr (2) +may be consulted for more information. +.SH BUGS +Although the name returned by +.I getwd +is guaranteed to be the path used to reach the directory, +if the name space has changed underfoot, the name may be +incorrect. |