home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Networking / wu-ftpd-2.4.2b13-MIHS / doc / realpath.3 < prev    next >
Encoding:
Text File  |  1994-04-01  |  1.5 KB  |  42 lines

  1. REALPATH(3)            C LIBRARY FUNCTIONS            REALPATH(3)
  2.  
  3. NAME
  4.      realpath - returns the canonicalized absolute pathname.
  5.  
  6. SYNOPSIS
  7.      #include <sys/param.h>
  8.  
  9.      char *realpath(file_name, resolved_name)
  10.      char *file_name;
  11.      char resolved_name[MAXPATHLEN];
  12.  
  13. DESCRIPTION
  14.      realpath() expands all symbolic links  and  resolves  refer-
  15.      ences  to '/./', '/../' and extra '/' characters in the null
  16.      terminated string named by file_name and stores the  canoni-
  17.      calized   absolute   pathname   in   the   buffer  named  by
  18.      resolved_name.  The resulting path  will  have  no  symbolic
  19.      links components, nor any '/./' or '/../' components.
  20.  
  21. RETURN VALUE
  22.      If  there  is  no  error,  it  returns  a  pointer  to   the
  23.      resolved_name.
  24.  
  25.      Otherwise  it  returns  a  NULL  pointer   and   places   in
  26.      resolved_name  the  absolute  pathname of the file_name com-
  27.      ponent which could not  be  resolved.  The  global  variable
  28.      errno is set to indicate the error. If any of the parameters
  29.      are NULL, errno will be set to EINVAL. realpath() indirectly
  30.      invokes  the  readlink(2)  system  call and getwd(3) library
  31.      call (for relative path names), and errno  will  be  set  by
  32.      them.
  33.  
  34. SEE ALSO
  35.      readlink(2), getwd(3)
  36.  
  37. WARNINGS
  38.      It  indirectly  invokes  the  readlink(2)  system  call  and
  39.      getwd(3)  library  call (for relative path names), and hence
  40.      inherits the possibility of hanging due to inaccessible file
  41.      system resources.
  42.