Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getcwd(3)

getwd(3)  —  Subroutines

NAME

getwd − Gets current directory pathname

LIBRARY

Standard C Library (libc.a)

SYNOPSIS

char ∗getwd (
char ∗path_name );

PARAMETERS

path_namePoints to the full pathname. 

DESCRIPTION

The getwd() function determines the absolute pathname of the current directory, then copies that pathname into the area pointed to by the path_name parameter. 

The maximum pathname length, in characters, is set by the PATH_MAX definition, as specified in the limits.h file. 

RETURN VALUES

Upon successful completion, a pointer to the absolute pathname of the current directory is returned.  If an error occurs, the getwd() function returns a value of 0 (zero) and places a message in the path_name parameter. 

RELATED INFORMATION

Functions: getcwd(3)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026