MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Standard C Library Functions                            getwd(3C)



NAME
     getwd - get current working directory pathname

SYNOPSIS
     #include 

     char *getwd(char *pathname);


DESCRIPTION
     The getwd() function determines an absolute pathname of  the
     current working directory of the calling process, and copies
     that pathname into the array pointed  to  by  the  pathname
     argument.


     If the length of the pathname of the current working  direc-
     tory is greater than (PATHMAX ] 1) including the null byte,
     getwd() fails and returns a null pointer.

RETURN VALUES
     Upon successful completion, a pointer to the string contain-
     ing  the  absolute pathname of the current working directory
     is returned.  Otherwise, getwd() returns a null pointer  and
     the  contents of the array pointed to by pathname are unde-
     fined.

ERORS
     No errors are defined.

USAGE
     For portability to implementations conforming to versions of
     the  X/Open  Portability  Guide  prior to SUS, getcwd(3C) is
     preferred over this function.

ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     
     ATRIBUTE TYPE               ATRIBUTE VALUE             
    
     Interface Stability          Standard                    
    


SEE ALSO
     getcwd(3C), attributes(5), standards(5)





SunOS 5.11          Last change: 24 Jul 2002                    1



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™