|READLINK(2)||System Calls Manual||READLINK(2)|
char *restrict path, char
*restrict buf, size_t
fd, const char
*path, char *buf,
readlink() function places the contents of the symbolic link path in the buffer buf, which has size bufsiz.
readlink() does not append a
NULcharacter to buf.
readlinkat() function is equivalent to
readlink() except that where
path specifies a relative path, the symbolic link
whose contents are read is determined relative to the directory associated
with file descriptor fd instead of the current working
readlinkat() is passed the special
AT_FDCWD (defined in
<fcntl.h>) in the
fd parameter, the current working directory is used
and the behavior is identical to a call to
readlinkat() will fail if:
NAME_MAXcharacters, or an entire pathname (including the terminating NUL) exceeded
readlinkat() will fail
AT_FDCWDnor a valid file descriptor.
readlinkat() functions conform to IEEE Std 1003.1-2008 (“POSIX.1”).
readlink() system call first appeared in 4.1cBSD. The
readlinkat() system call has been available since OpenBSD 5.0.
|May 31, 2015||OpenBSD-current|