MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Standard C Library Functions                         realpath(3C)



NAME
     realpath - resolve pathname

SYNOPSIS
     #include 

     char *realpath(const char *restrict filename,
          char *restrict resolvedname);


DESCRIPTION
     The realpath() function derives, from the  pathname  pointed
     to  by  filename,  an absolute pathname that names the same
     file, whose resolution does not involve ".", "..",  or  sym-
     bolic  links.  The  generated  pathname is stored as a null-
     terminated string, up  to  a  maximum  of  {PATHMAX}  bytes
     (defined  in  limits.h(3HEAD)),  in the buffer pointed to by
     resolvedname.

RETURN VALUES
     On successful completion, realpath() returns  a  pointer  to
     the  resolved  name.   Otherwise,  realpath() returns a null
     pointer and sets errno to indicate the error, and  the  con-
     tents  of the buffer pointed to by resolvedname are left in
     an indeterminate state.

ERORS
     The realpath() function will fail if:

     EACES          Read or search permission was denied  for  a
                     component of filename.


     EINVAL          Either the filename or resolvedname  argu-
                     ment is a null pointer.


     EIO             An error occurred  while  reading  from  the
                     file system.


     ELOP           Too many symbolic links were encountered  in
                     resolving filename.


     ELOP           A loop exists in symbolic links  encountered
                     during resolution of the filename argument.


     ENAMETOLONG    The  filename  argument  is   longer   than
                     {PATHMAX} or a pathname component is longer
                     than {NAMEMAX}.



SunOS 5.11           Last change: 9 Oct 2003                    1






Standard C Library Functions                         realpath(3C)



     ENOENT          A component of filename does  not  name  an
                     existing  file  or  filename  points  to an
                     empty string.


     ENOTDIR         A component of the  path  prefix  is  not  a
                     directory.



     The realpath() function may fail if:

     ENAMETOLONG    Pathname resolution of a symbolic link  pro-
                     duced  an  intermediate  result whose length
                     exceeds {PATHMAX}.


     ENOMEM          Insufficient storage space is available.


USAGE
     The realpath() function operates on null-terminated strings.


     Execute permission is required for all  the  directories  in
     the given and the resolved path.


     The realpath() function might fail to return to the  current
     directory if an error occurs.

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



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Interface Stability          Standard                    
    
     MT-Level                     MT-Safe                     
    


SEE ALSO
     getcwd(3C),  limits.h(3HEAD),  sysconf(3C),   attributes(5),
     standards(5)






SunOS 5.11           Last change: 9 Oct 2003                    2



OpenSolaris man pages main menu

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