Rev | Line | |
---|
[9] | 1 | .\" Copyright (c) 1983 Regents of the University of California.
|
---|
| 2 | .\" All rights reserved. The Berkeley software License Agreement
|
---|
| 3 | .\" specifies the terms and conditions for redistribution.
|
---|
| 4 | .\"
|
---|
| 5 | .\" @(#)getwd.3 6.2 (Berkeley) 5/12/86
|
---|
| 6 | .\"
|
---|
| 7 | .TH GETCWD 3 "May 12, 1986"
|
---|
| 8 | .UC 5
|
---|
| 9 | .SH NAME
|
---|
| 10 | getcwd \- get current working directory pathname
|
---|
| 11 | .SH SYNOPSIS
|
---|
| 12 | .nf
|
---|
| 13 | .ft B
|
---|
| 14 | #include <unistd.h>
|
---|
| 15 |
|
---|
| 16 | char *getcwd(char *\fIpathname\fP, size_t \fIlen\fP)
|
---|
| 17 | .fi
|
---|
| 18 | .SH DESCRIPTION
|
---|
| 19 | .B Getcwd
|
---|
| 20 | copies the absolute pathname of the current working directory to
|
---|
| 21 | .I pathname
|
---|
| 22 | and returns a pointer to the result.
|
---|
| 23 | .I Pathname
|
---|
| 24 | is a character array of length
|
---|
| 25 | .IR len .
|
---|
| 26 | .SH DIAGNOSTICS
|
---|
| 27 | .B Getcwd
|
---|
| 28 | returns a null pointer and sets
|
---|
| 29 | .B errno
|
---|
| 30 | if an error occurs. The error will reflect the system call errors that
|
---|
| 31 | may occur if the path to the current directory is searched upwards to
|
---|
| 32 | the root directory. The error
|
---|
| 33 | .B ERANGE
|
---|
| 34 | is returned if the result does not fit within
|
---|
| 35 | .I len
|
---|
| 36 | bytes.
|
---|
Note:
See
TracBrowser
for help on using the repository browser.