Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygendirent.h
Go to the documentation of this file.
00001 00006 #include <crtdefs.h> 00007 00008 #ifndef __STRICT_ANSI__ 00009 00010 #ifndef _DIRENT_H_ 00011 #define _DIRENT_H_ 00012 00013 00014 #pragma pack(push,_CRT_PACKING) 00015 00016 #include <io.h> 00017 00018 #ifndef RC_INVOKED 00019 00020 #ifdef __cplusplus 00021 extern "C" { 00022 #endif 00023 00024 struct dirent 00025 { 00026 long d_ino; /* Always zero. */ 00027 unsigned short d_reclen; /* Always zero. */ 00028 unsigned short d_namlen; /* Length of name in d_name. */ 00029 char* d_name; /* File name. */ 00030 /* NOTE: The name in the dirent structure points to the name in the 00031 * finddata_t structure in the DIR. */ 00032 }; 00033 00034 /* 00035 * This is an internal data structure. Good programmers will not use it 00036 * except as an argument to one of the functions below. 00037 * dd_stat field is now int (was short in older versions). 00038 */ 00039 typedef struct 00040 { 00041 /* disk transfer area for this dir */ 00042 struct _finddata_t dd_dta; 00043 00044 /* dirent struct to return from dir (NOTE: this makes this thread 00045 * safe as long as only one thread uses a particular DIR struct at 00046 * a time) */ 00047 struct dirent dd_dir; 00048 00049 /* _findnext handle */ 00050 long dd_handle; 00051 00052 /* 00053 * Status of search: 00054 * 0 = not started yet (next entry to read is first entry) 00055 * -1 = off the end 00056 * positive = 0 based index of next entry 00057 */ 00058 int dd_stat; 00059 00060 /* given path for dir with search pattern (struct is extended) */ 00061 char dd_name[1]; 00062 } DIR; 00063 00064 DIR* __cdecl opendir (const char*); 00065 struct dirent* __cdecl readdir (DIR*); 00066 int __cdecl closedir (DIR*); 00067 void __cdecl rewinddir (DIR*); 00068 long __cdecl telldir (DIR*); 00069 void __cdecl seekdir (DIR*, long); 00070 00071 00072 /* wide char versions */ 00073 00074 struct _wdirent 00075 { 00076 long d_ino; /* Always zero. */ 00077 unsigned short d_reclen; /* Always zero. */ 00078 unsigned short d_namlen; /* Length of name in d_name. */ 00079 wchar_t* d_name; /* File name. */ 00080 /* NOTE: The name in the dirent structure points to the name in the * wfinddata_t structure in the _WDIR. */ 00081 }; 00082 00083 /* 00084 * This is an internal data structure. Good programmers will not use it 00085 * except as an argument to one of the functions below. 00086 */ 00087 typedef struct 00088 { 00089 /* disk transfer area for this dir */ 00090 struct _wfinddata_t dd_dta; 00091 00092 /* dirent struct to return from dir (NOTE: this makes this thread 00093 * safe as long as only one thread uses a particular DIR struct at 00094 * a time) */ 00095 struct _wdirent dd_dir; 00096 00097 /* _findnext handle */ 00098 long dd_handle; 00099 00100 /* 00101 * Status of search: 00102 * 0 = not started yet (next entry to read is first entry) 00103 * -1 = off the end 00104 * positive = 0 based index of next entry 00105 */ 00106 int dd_stat; 00107 00108 /* given path for dir with search pattern (struct is extended) */ 00109 wchar_t dd_name[1]; 00110 } _WDIR; 00111 00112 00113 00114 _WDIR* __cdecl _wopendir (const wchar_t*); 00115 struct _wdirent* __cdecl _wreaddir (_WDIR*); 00116 int __cdecl _wclosedir (_WDIR*); 00117 void __cdecl _wrewinddir (_WDIR*); 00118 long __cdecl _wtelldir (_WDIR*); 00119 void __cdecl _wseekdir (_WDIR*, long); 00120 00121 00122 #ifdef __cplusplus 00123 } 00124 #endif 00125 00126 #endif /* Not RC_INVOKED */ 00127 00128 #pragma pack(pop) 00129 00130 #endif /* Not _DIRENT_H_ */ 00131 00132 00133 #endif /* Not __STRICT_ANSI__ */ 00134 Generated on Sat May 26 2012 04:28:26 for ReactOS by
1.7.6.1
|