ReactOS 0.4.15-dev-7788-g1ad9096
dirent.h
Go to the documentation of this file.
1
6#include <crtdefs.h>
7
8#ifndef __STRICT_ANSI__
9
10#ifndef _DIRENT_H_
11#define _DIRENT_H_
12
13
14#pragma pack(push,_CRT_PACKING)
15
16#include <io.h>
17
18#ifndef RC_INVOKED
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24 struct dirent
25 {
26 long d_ino; /* Always zero. */
27 unsigned short d_reclen; /* Always zero. */
28 unsigned short d_namlen; /* Length of name in d_name. */
29 char* d_name; /* File name. */
30 /* NOTE: The name in the dirent structure points to the name in the
31 * finddata_t structure in the DIR. */
32 };
33
34 /*
35 * This is an internal data structure. Good programmers will not use it
36 * except as an argument to one of the functions below.
37 * dd_stat field is now int (was short in older versions).
38 */
39 typedef struct
40 {
41 /* disk transfer area for this dir */
42 struct _finddata_t dd_dta;
43
44 /* dirent struct to return from dir (NOTE: this makes this thread
45 * safe as long as only one thread uses a particular DIR struct at
46 * a time) */
47 struct dirent dd_dir;
48
49 /* _findnext handle */
51
52 /*
53 * Status of search:
54 * 0 = not started yet (next entry to read is first entry)
55 * -1 = off the end
56 * positive = 0 based index of next entry
57 */
59
60 /* given path for dir with search pattern (struct is extended) */
61 char dd_name[1];
62 } DIR;
63
64 DIR* __cdecl opendir (const char*);
69 void __cdecl seekdir (DIR*, long);
70
71
72 /* wide char versions */
73
74 struct _wdirent
75 {
76 long d_ino; /* Always zero. */
77 unsigned short d_reclen; /* Always zero. */
78 unsigned short d_namlen; /* Length of name in d_name. */
79 wchar_t* d_name; /* File name. */
80 /* NOTE: The name in the dirent structure points to the name in the * wfinddata_t structure in the _WDIR. */
81 };
82
83 /*
84 * This is an internal data structure. Good programmers will not use it
85 * except as an argument to one of the functions below.
86 */
87 typedef struct
88 {
89 /* disk transfer area for this dir */
90 struct _wfinddata_t dd_dta;
91
92 /* dirent struct to return from dir (NOTE: this makes this thread
93 * safe as long as only one thread uses a particular DIR struct at
94 * a time) */
95 struct _wdirent dd_dir;
96
97 /* _findnext handle */
99
100 /*
101 * Status of search:
102 * 0 = not started yet (next entry to read is first entry)
103 * -1 = off the end
104 * positive = 0 based index of next entry
105 */
107
108 /* given path for dir with search pattern (struct is extended) */
109 wchar_t dd_name[1];
110 } _WDIR;
111
112
113
114 _WDIR* __cdecl _wopendir (const wchar_t*);
119 void __cdecl _wseekdir (_WDIR*, long);
120
121
122#ifdef __cplusplus
123}
124#endif
125
126#endif /* Not RC_INVOKED */
127
128#pragma pack(pop)
129
130#endif /* Not _DIRENT_H_ */
131
132
133#endif /* Not __STRICT_ANSI__ */
134
#define __cdecl
Definition: accygwin.h:79
void __cdecl seekdir(DIR *, long)
int __cdecl closedir(DIR *)
struct _wdirent *__cdecl _wreaddir(_WDIR *)
int __cdecl _wclosedir(_WDIR *)
DIR *__cdecl opendir(const char *)
void __cdecl _wrewinddir(_WDIR *)
void __cdecl _wseekdir(_WDIR *, long)
void __cdecl rewinddir(DIR *)
long __cdecl _wtelldir(_WDIR *)
_WDIR *__cdecl _wopendir(const wchar_t *)
long __cdecl telldir(DIR *)
struct dirent *__cdecl readdir(DIR *)
Definition: dirent.h:40
int dd_stat
Definition: dirent.h:58
long dd_handle
Definition: dirent.h:50
Definition: dirent.h:88
int dd_stat
Definition: dirent.h:106
long dd_handle
Definition: dirent.h:98
Definition: io.h:37
unsigned short d_namlen
Definition: dirent.h:78
wchar_t * d_name
Definition: dirent.h:79
long d_ino
Definition: dirent.h:76
unsigned short d_reclen
Definition: dirent.h:77
Definition: fatfs.h:198
unsigned short d_namlen
Definition: dirent.h:28
unsigned short d_reclen
Definition: dirent.h:27
char * d_name
Definition: dirent.h:29
long d_ino
Definition: dirent.h:26