REWINDDIR(3)               POSIX Programmer's Manual              REWINDDIR(3)



PPRROOLLOOGG
       This manual page is part of the POSIX Programmer's Manual.  The OS
       implementation of this interface may differ (consult the corresponding
       OS manual page for details of OS behavior), or the interface may not be
       implemented on OS.


NNAAMMEE
       rewinddir -- reset the position of a directory stream to the beginning
       of a directory

SSYYNNOOPPSSIISS
       #include <dirent.h>

       void rewinddir(DIR *_d_i_r_p);

DDEESSCCRRIIPPTTIIOONN
       The _r_e_w_i_n_d_d_i_r() function shall reset the position of the directory
       stream to which _d_i_r_p refers to the beginning of the directory. It shall
       also cause the directory stream to refer to the current state of the
       corresponding directory, as a call to _o_p_e_n_d_i_r() would have done. If
       _d_i_r_p does not refer to a directory stream, the effect is undefined.

       After a call to the _f_o_r_k() function, either the parent or child (but
       not both) may continue processing the directory stream using _r_e_a_d_d_i_r(),
       _r_e_w_i_n_d_d_i_r(), or _s_e_e_k_d_i_r().  If both the parent and child processes use
       these functions, the result is undefined.

RREETTUURRNN VVAALLUUEE
       The _r_e_w_i_n_d_d_i_r() function shall not return a value.

EERRRROORRSS
       No errors are defined.

       _T_h_e _f_o_l_l_o_w_i_n_g _s_e_c_t_i_o_n_s _a_r_e _i_n_f_o_r_m_a_t_i_v_e_.

EEXXAAMMPPLLEESS
       None.

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       The _r_e_w_i_n_d_d_i_r() function should be used in conjunction with _o_p_e_n_d_i_r(),
       _r_e_a_d_d_i_r(), and _c_l_o_s_e_d_i_r() to examine the contents of the directory.
       This method is recommended for portability.

RRAATTIIOONNAALLEE
       None.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       None.

SSEEEE AALLSSOO
       _c_l_o_s_e_d_i_r(), _f_d_o_p_e_n_d_i_r(), _r_e_a_d_d_i_r()

       The Base Definitions volume of POSIX.1-2008, <<ddiirreenntt..hh>>, <<ssyyss__ttyyppeess..hh>>

CCOOPPYYRRIIGGHHTT
       Portions of this text are reprinted and reproduced in electronic form
       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
       -- Portable Operating System Interface (POSIX), The Open Group Base
       Specifications Issue 7, Copyright (C) 2013 by the Institute of
       Electrical and Electronics Engineers, Inc and The Open Group.  (This is
       POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
       event of any discrepancy between this version and the original IEEE and
       The Open Group Standard, the original IEEE and The Open Group Standard
       is the referee document. The original Standard can be obtained online
       at http://www.unix.org/online.html .

       Any typographical or formatting errors that appear in this page are
       most likely to have been introduced during the conversion of the source
       files to man page format. To report such errors, see
       https://www.kernel.org/doc/man-pages/reporting_bugs.html .



IEEE/The Open Group                  2013                         REWINDDIR(3)
