blob: 9a379a35a123e5b174630c6856e8cbcbea0a21db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
/* $Id$
* ============================================================================
*
* = LIBRARY
* pace
*
* = FILENAME
* pace/win32/dirent.h
*
* = AUTHOR
* Luther Baker
*
* ============================================================================ */
#ifndef PACE_DIRENT_H_WIN32
#define PACE_DIRENT_H_WIN32
#include "pace/sys/types.h"
#include "windows.h"
#if defined (PACE_HAS_CPLUSPLUS)
extern "C" {
#endif /* PACE_HAS_CPLUSPLUS */
#ifndef PACE_DIRENT_T
#define PACE_DIRENT_T
typedef struct /* dirent */ {
unsigned short d_ino;
unsigned short d_off;
unsigned short d_reclen;
char * d_name;
} pace_dirent;
#endif /* PACE_DIRENT_T */
#ifndef PACE_DIR_T
#define PACE_DIR_T
typedef WIN32_FIND_DATA PACE_TEXT_WIN32_FIND_DATA;
typedef struct /* DIR */ {
char * directory_name_;
// The name of the directory we are looking into
HANDLE current_handle_;
// Remember the handle between calls.
pace_dirent dirent_;
// The struct for the results
PACE_TEXT_WIN32_FIND_DATA fdata_;
// The struct for intermediate results.
int started_reading_;
// A flag to remember if we started reading already.
} PACE_DIR;
#endif /* PACE_DIR_T */
#if (PACE_HAS_POSIX_FS_UOF)
int closedir (PACE_DIR * dirp);
#endif /* PACE_HAS_POSIX_FS_UOF */
#if (PACE_HAS_POSIX_FS_UOF)
PACE_DIR * opendir (const char * dirname);
#endif /* PACE_HAS_POSIX_FS_UOF */
#if (PACE_HAS_POSIX_FS_UOF)
pace_dirent * readdir (PACE_DIR * dirp);
#endif /* PACE_HAS_POSIX_FS_UOF */
#if defined (PACE_HAS_CPLUSPLUS)
}
#endif /* PACE_HAS_CPLUSPLUS */
#endif /* PACE_DIRENT_H_WIN32 */
|