getcwd man page on OPENSTEP

Man page or keyword search:  
man Server   1419 pages
apropos Keyword Search (all sections)
Output format
OPENSTEP logo
[printable version]


GETCWD(3P)							    GETCWD(3P)

NAME
       getcwd - (POSIX only) get current working directory pathname

SYNOPSIS
       char *getcwd(char *buf, size_t size);

DESCRIPTION
       Getcwd  is  a POSIX function.  BSD provides this functionality with the
       getwd(3) function.

       The getcwd function copies the absolute pathname of the current working
       directory  to  the array pointed to by buf and returns a pointer to the
       result.	The size argument is the size in bytes of the array.

       If buf is NULL, then getcwd allocates an	 array	of  char,  copies  the
       pathname and returns a pointer to the array.

RETURN VALUE
       Upon   successful   completion,	 getcwd	 returns  the  bufP  argument.
       Otherwise, a NULL pointer is returned and errno is set to indicate  the
       error.

ERRORS
       If  any of the following conditions occurs, the getcwd function returns
       a NULL pointer and sets errno to the corresponding value:

       [EAGAIN]	      The buf argument is NULL and getcwd fails to allocate an
		      array for the pathname.

       [EINVAL]	      The size argument is zero.

       [ERANGE]	      The  size argument is greater than zero but smaller than
		      the length of  the  absolute  pathname  of  the  current
		      directory plus 1.

SEE ALSO
       chdir(2), getwd(3)

				August 1, 1992			    GETCWD(3P)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server OPENSTEP

List of man pages available for OPENSTEP

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net