php-internal-docs
8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
readdir.h
Go to the documentation of this file.
1
#ifndef READDIR_H
2
#define READDIR_H
3
4
5
#ifdef __cplusplus
6
extern
"C"
{
7
#endif
8
9
/*
10
* Structures and types used to implement opendir/readdir/closedir
11
* on Windows.
12
*/
13
14
#include <config.w32.h>
15
16
#include "
ioutil.h
"
17
18
#define _DIRENT_HAVE_D_TYPE
19
#define DT_UNKNOWN 0
20
#define DT_DIR 4
21
#define DT_REG 8
22
23
/* struct dirent - same as Unix */
24
struct
dirent
{
25
long
d_ino
;
/* inode (always 1 in WIN32) */
26
off_t
d_off
;
/* offset to this dirent */
27
unsigned
short
d_reclen
;
/* length of d_name */
28
unsigned
char
d_type
;
29
char
d_name
[1];
/* null terminated filename in the current encoding, glyph number <= 255 wchar_t's + \0 byte */
30
};
31
32
/* typedef DIR - not the same as Unix */
33
struct
DIR_W32
{
34
HANDLE
handle
;
/* _findfirst/_findnext handle */
35
uint32_t
offset
;
/* offset into directory */
36
uint8_t
finished
;
/* 1 if there are not more files */
37
WIN32_FIND_DATAW
fileinfo
;
/* from _findfirst/_findnext */
38
wchar_t
*
dirw
;
/* the dir we are reading */
39
struct
dirent
dent
;
/* the dirent to return */
40
};
41
typedef
struct
DIR_W32
DIR
;
42
43
/* Function prototypes */
44
DIR
*
opendir
(
const
char
*);
45
struct
dirent
*
readdir
(
DIR
*);
46
int
closedir
(
DIR
*);
47
int
rewinddir
(
DIR
*);
48
49
#ifdef __cplusplus
50
}
51
#endif
52
53
#endif
/* READDIR_H */
ioutil.h
closedir
int closedir(DIR *)
Definition
readdir.c:134
rewinddir
int rewinddir(DIR *)
Definition
readdir.c:151
readdir
struct dirent * readdir(DIR *)
Definition
readdir.c:95
DIR
struct DIR_W32 DIR
Definition
readdir.h:41
opendir
DIR * opendir(const char *)
Definition
readdir.c:24
DIR_W32
Definition
readdir.h:33
DIR_W32::offset
uint32_t offset
Definition
readdir.h:35
DIR_W32::finished
uint8_t finished
Definition
readdir.h:36
DIR_W32::fileinfo
WIN32_FIND_DATAW fileinfo
Definition
readdir.h:37
DIR_W32::handle
HANDLE handle
Definition
readdir.h:34
DIR_W32::dent
struct dirent dent
Definition
readdir.h:39
DIR_W32::dirw
wchar_t * dirw
Definition
readdir.h:38
dirent
Definition
readdir.h:24
dirent::d_reclen
unsigned short d_reclen
Definition
readdir.h:27
dirent::d_name
char d_name[1]
Definition
readdir.h:29
dirent::d_ino
long d_ino
Definition
readdir.h:25
dirent::d_type
unsigned char d_type
Definition
readdir.h:28
dirent::d_off
off_t d_off
Definition
readdir.h:26
win32
readdir.h
Generated on Sat Aug 23 2025 01:46:13 for php-internal-docs by
1.13.2