resolvepath(2) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

resolvepath(2)

resolvepath(2)                   System Calls                   resolvepath(2)



NAME
       resolvepath - resolve all symbolic links of a path name

SYNOPSIS
       #include <unistd.h>

       int resolvepath(const char *path, char *buf, size_t bufsiz);

DESCRIPTION
       The  resolvepath()  function  fully  resolves all symbolic links in the
       path name path into a resulting path name free of  symbolic  links  and
       places the resulting path name in the buffer buf which has size bufsiz.
       The resulting path name names the same file or directory as the  origi‐
       nal  path name. All '.' components are eliminated and every non-leading
       '..' component is eliminated together with its preceding directory com‐
       ponent.  If  leading  '..' components reach to the root directory, they
       are replaced by '/'. If the number of bytes in the resulting path  name
       is  less than bufsiz, the contents of the remainder of buf are unspeci‐
       fied.

RETURN VALUES
       Upon successful completion, resolvepath() returns the  count  of  bytes
       placed  in  the  buffer.  Otherwise,  it  returns −1, leaves the buffer
       unchanged, and sets errno to indicate the error.

ERRORS
       The resolvepath() function will fail if:

       EACCES          Search permission is denied for a component of the path
                       prefix of path or for a path prefix component resulting
                       from the resolution of a symbolic link.


       EFAULT          The path or buf argument points to an illegal address.


       EIO             An I/O error occurred while reading from the file  sys‐
                       tem.


       ENOENT          The  path argument is an empty string or a component of
                       path or a path name component produced by  resolving  a
                       symbolic link does not name an existing file.


       ELOOP           Too  many  symbolic links were encountered in resolving
                       path.


       ENAMETOOLONG    The length of path exceeds PATH_MAX,  or  a  path  name
                       component is longer than NAME_MAX. Path name resolution
                       of a symbolic  link  produced  an  intermediate  result
                       whose  length  exceeds  PATH_MAX  or  a component whose
                       length exceeds NAME_MAX.


       ENOTDIR         A component of the path prefix of path  or  of  a  path
                       prefix  component  resulting  from  the resolution of a
                       symbolic link is not a directory.


USAGE
       No more than PATH_MAX bytes will be placed in the buffer.  Applications
       should  not  assume  that the returned contents of the buffer are null-
       terminated.

SEE ALSO
       readlink(2), realpath(3C)



Oracle Solaris 11.4               12 May 1997                   resolvepath(2)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3