Query: getwd
OS: hpux
Section: 3c
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
getwd(3C) getwd(3C)NAMEgetwd() - get pathname of current working directorySYNOPSISDESCRIPTIONplaces the absolute pathname of the current working directory in the array pointed to by buf, and returns buf. If the length of the pathname of the current working directory is greater than bytes, fails and returns a null pointer.RETURN VALUEUpon successful completion, returns a pointer to the current directory pathname. Otherwise, it returns NULL with set.ERRORSfails if the following condition is encountered: The length of the specified path name exceeds bytes, or the length of a component of the path name exceeds bytes while is in effect. may fail if any of the following conditions are encountered: Read or search permission is denied for a component of pathname. buf points outside the allocated address space of the process. may not always detect this error.EXAMPLES#include <stdio.h> #include <unistd.h> char *cwd; char buf[PATH_MAX+1]; ... if ((cwd = getwd(buf)) == NULL) { perror("getwd"); exit(1); } puts(cwd);WARNINGSFor portability, is preferred over this function.AUTHORwas developed by HP and the University of California, Berkeley.SEE ALSOgetcwd(3C), thread_safety(5).STANDARDS CONFORMANCEgetwd(3C)
Related Man Pages |
---|
getwd(3) - mojave |
getcwd(3) - suse |
getcwd(3) - netbsd |
getwd(3) - netbsd |
getcwd(3c) - hpux |
Similar Topics in the Unix Linux Community |
---|
cwd |
#$ -cwd #what does this mean? |
What is use of "char __user *buf"? |