getcwd.3
来自「操作系统设计与实现源码」· 3 代码 · 共 37 行
3
37 行
.\" Copyright (c) 1983 Regents of the University of California..\" All rights reserved. The Berkeley software License Agreement.\" specifies the terms and conditions for redistribution..\".\" @(#)getwd.3 6.2 (Berkeley) 5/12/86.\".TH GETCWD 3 "May 12, 1986".UC 5.SH NAMEgetcwd \- get current working directory pathname.SH SYNOPSIS.nf.ft B#include <unistd.h>char *getcwd(char *\fIpathname\fP, size_t \fIlen\fP).fi.SH DESCRIPTION.B Getcwdcopies the absolute pathname of the current working directory to.I pathnameand returns a pointer to the result..I Pathnameis a character array of length.IR len ..SH DIAGNOSTICS.B Getcwdreturns a null pointer and sets.B errnoif an error occurs. The error will reflect the system call errors thatmay occur if the path to the current directory is searched upwards tothe root directory. The error.B ERANGEis returned if the result does not fit within.I lenbytes.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?