logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

rewinddir.3p (2718B)


  1. '\" et
  2. .TH REWINDDIR "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. rewinddir
  12. \(em reset the position of a directory stream to the beginning
  13. of a directory
  14. .SH SYNOPSIS
  15. .LP
  16. .nf
  17. #include <dirent.h>
  18. .P
  19. void rewinddir(DIR *\fIdirp\fP);
  20. .fi
  21. .SH DESCRIPTION
  22. The
  23. \fIrewinddir\fR()
  24. function shall reset the position of the directory stream to which
  25. .IR dirp
  26. refers to the beginning of the directory. It shall also cause the
  27. directory stream to refer to the current state of the corresponding
  28. directory, as a call to
  29. \fIopendir\fR()
  30. would have done. If
  31. .IR dirp
  32. does not refer to a directory stream, the effect is undefined.
  33. .P
  34. After a call to the
  35. \fIfork\fR()
  36. function, either the parent or child (but not both) may continue
  37. processing the directory stream using
  38. \fIreaddir\fR(),
  39. \fIrewinddir\fR(),
  40. or
  41. \fIseekdir\fR().
  42. If both the parent and child processes use these functions, the result
  43. is undefined.
  44. .SH "RETURN VALUE"
  45. The
  46. \fIrewinddir\fR()
  47. function shall not return a value.
  48. .SH ERRORS
  49. No errors are defined.
  50. .LP
  51. .IR "The following sections are informative."
  52. .SH EXAMPLES
  53. None.
  54. .SH "APPLICATION USAGE"
  55. The
  56. \fIrewinddir\fR()
  57. function should be used in conjunction with
  58. \fIopendir\fR(),
  59. \fIreaddir\fR(),
  60. and
  61. \fIclosedir\fR()
  62. to examine the contents of the directory. This method is recommended
  63. for portability.
  64. .SH RATIONALE
  65. None.
  66. .SH "FUTURE DIRECTIONS"
  67. None.
  68. .SH "SEE ALSO"
  69. .IR "\fIclosedir\fR\^(\|)",
  70. .IR "\fIfdopendir\fR\^(\|)",
  71. .IR "\fIreaddir\fR\^(\|)"
  72. .P
  73. The Base Definitions volume of POSIX.1\(hy2017,
  74. .IR "\fB<dirent.h>\fP",
  75. .IR "\fB<sys_types.h>\fP"
  76. .\"
  77. .SH COPYRIGHT
  78. Portions of this text are reprinted and reproduced in electronic form
  79. from IEEE Std 1003.1-2017, Standard for Information Technology
  80. -- Portable Operating System Interface (POSIX), The Open Group Base
  81. Specifications Issue 7, 2018 Edition,
  82. Copyright (C) 2018 by the Institute of
  83. Electrical and Electronics Engineers, Inc and The Open Group.
  84. In the event of any discrepancy between this version and the original IEEE and
  85. The Open Group Standard, the original IEEE and The Open Group Standard
  86. is the referee document. The original Standard can be obtained online at
  87. http://www.opengroup.org/unix/online.html .
  88. .PP
  89. Any typographical or formatting errors that appear
  90. in this page are most likely
  91. to have been introduced during the conversion of the source files to
  92. man page format. To report such errors, see
  93. https://www.kernel.org/doc/man-pages/reporting_bugs.html .