📄 syscalls_25.html
字号:
<!-- This HTML file has been created by texi2html 1.29
from syscalls.texi on 4 June 1994 -->
<TITLE>Syscall specifications of Linux - readdir</TITLE>
<P>Go to the <A HREF="syscalls_24.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_24.html">previous</A>, <A HREF="syscalls_26.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_26.html">next</A> section.<P>
<H2><A NAME="SEC25" HREF="syscalls_toc.html#SEC25" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_toc.html#SEC25">readdir</A></H2>
<P>
<H3>SYNOPSIS</H3>
<P>
<CODE>struct dirent *readdir(DIR *<VAR>dir</VAR>);</CODE>
<P>
<H3>PARAMETERS</H3>
<P>
<VAR>dir</VAR>: [in] the file descriptor of a directory.
<P>
<H3>DESCRIPTION</H3>
<P>
This call returns in a <CODE>dirent</CODE> structure the next entry of a
directory or <CODE>NULL</CODE> if the end is reached or an error occurs. The
area where the pointer returned by readdir points to is a static space
that is overwritten by subsequent calls to readdir.
<P>
(It there no way to implement that call in user space???)
<P>
<H3>RETURN VALUE</H3>
<P>
On success, returns a pointer to the <CODE>dirent</CODE> structure. On error,
returns -1 and sets <CODE>errno</CODE> to the following value: <CODE>EBADF</CODE>.
<P>
<P>Go to the <A HREF="syscalls_24.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_24.html">previous</A>, <A HREF="syscalls_26.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_26.html">next</A> section.<P>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -