Query: scandirat
OS: centos
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
SCANDIRAT(3) Linux Programmer's Manual SCANDIRAT(3)NAMEscandirat - scan a directory relative to a directory file descriptorSYNOPSIS#define _GNU_SOURCE /* See feature_test_macros(7) */ #include <fcntl.h> /* Definition of AT_* constants */ #include <dirent.h> int scandirat(int dirfd, const char *dirp, struct dirent ***namelist, int (*filter)(const struct dirent *), int (*compar)(const struct dirent **, const struct dirent **));DESCRIPTIONThe scandirat() system call operates in exactly the same way as scandir(3), except for the differences described in this manual page. If the pathname given in dirp is relative, then it is interpreted relative to the directory referred to by the file descriptor dirfd (rather than relative to the current working directory of the calling process, as is done by scandir(3) for a relative pathname). If dirp is relative and dirfd is the special value AT_FDCWD, then dirp is interpreted relative to the current working directory of the calling process (like scandir(3)). If dirp is absolute, then dirfd is ignored.RETURN VALUEOn success, scandirat() returns the number of directory entries selected. On error, -1 is returned and errno is set to indicate the error.ERRORSThe same errors that occur for scandir(3) can also occur for scandirat(). The following additional errors can occur for scandirat(): EBADF dirfd is not a valid file descriptor. ENOTDIR dirp is a relative path and dirfd is a file descriptor referring to a file other than a directory.VERSIONSscandirat() was added to glibc in version 2.15.CONFORMING TOThis function is a GNU extension.NOTESSee openat(2) for an explanation of the need for scandirat().SEE ALSOopenat(2), scandir(3), path_resolution(7)COLOPHONThis page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2012-03-17 SCANDIRAT(3)
Related Man Pages |
---|
scandir(3) - minix |
versionsort(3) - php |
versionsort(3) - minix |
scandirat(3) - v7 |
versionsort(3) - plan9 |
Similar Topics in the Unix Linux Community |
---|
DB2 convert digits to binary format |
Tar Command |
CentOS 6 ran out of space, need to reclaim it |
[TIP] Processing YAML files with yq |
Please Welcome Dave Munro to the Moderator Team! |