GETCWD.3
Upload User: jnzhq888
Upload Date: 2007-01-18
Package Size: 51694k
Code Size: 1k
Category:

OS Develop

Development Platform:

WINDOWS

  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. char *getcwd(char *fIpathnamefP, size_t fIlenfP)
  16. .fi
  17. .SH DESCRIPTION
  18. .B Getcwd
  19. copies the absolute pathname of the current working directory to
  20. .I pathname
  21. and returns a pointer to the result.
  22. .I Pathname
  23. is a character array of length
  24. .IR len .
  25. .SH DIAGNOSTICS
  26. .B Getcwd
  27. returns a null pointer and sets
  28. .B errno
  29. if an error occurs.  The error will reflect the system call errors that
  30. may occur if the path to the current directory is searched upwards to
  31. the root directory.  The error
  32. .B ERANGE
  33. is returned if the result does not fit within
  34. .I len
  35. bytes.