| /* A part of the Native C Library for Windows NT |
| Copyright 2007-2015 PC GO Ld. |
| |
| This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
| |
| This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
| */ |
| |
| #ifndef _DIRENT_H |
| #define _DIRENT_H |
| |
| #include <sys/types.h> |
| |
| #ifdef __cplusplus |
| extern "C" { |
| #endif |
| |
| #define DT_UNKNOWN 0 |
| #define DT_FIFO 1 |
| #define DT_CHR 2 |
| #define DT_DIR 4 |
| #define DT_BLK 6 |
| #define DT_REG 8 |
| #define DT_LNK 10 |
| #define DT_SOCK 12 |
| #define DT_WHT 14 |
| |
| struct dirent { |
| ino_t d_ino; |
| unsigned short int d_reclen; |
| unsigned char d_type; |
| char d_name[256]; |
| }; |
| |
| #define _DIRENT_HAVE_D_RECLEN |
| #define _DIRENT_HAVE_D_TYPE |
| |
| typedef struct __dir DIR; |
| #ifdef _DIRENT_IMPLEMENTATION |
| #define _DIRTYPE_OBJECT 0 // A directory object in the Object Manager |
| #define _DIRTYPE_FILE 1 // A directory file on a file system |
| struct __dir { |
| void *handle; |
| unsigned char type; |
| unsigned long int context; |
| struct dirent dir; |
| }; |
| #endif |
| |
| DIR *__cdecl __MINGW_NOTHROW fdopendir(int); |
| DIR *__cdecl __MINGW_NOTHROW opendir(const char *); |
| struct dirent *__cdecl __MINGW_NOTHROW readdir(DIR *); |
| int __cdecl __MINGW_NOTHROW closedir(DIR *); |
| void __cdecl __MINGW_NOTHROW rewinddir(DIR *); |
| long __cdecl __MINGW_NOTHROW telldir(DIR *); |
| void __cdecl __MINGW_NOTHROW seekdir(DIR *, long int); |
| |
| #ifdef __cplusplus |
| } |
| #endif |
| |
| #endif |