]>
Commit | Line | Data |
---|---|---|
bb742ede | 1 | /* |
5e0de328 | 2 | * Copyright (C) 2009-2012 the libgit2 contributors |
bb742ede VM |
3 | * |
4 | * This file is part of libgit2, distributed under the GNU GPL v2 with | |
5 | * a Linking Exception. For full terms see the included COPYING file. | |
6 | */ | |
0234c186 RJ |
7 | #ifndef INCLUDE_dir_h__ |
8 | #define INCLUDE_dir_h__ | |
9 | ||
10 | #include "common.h" | |
11 | ||
e97179b6 | 12 | struct git__dirent { |
87d9869f | 13 | int d_ino; |
0234c186 RJ |
14 | char d_name[261]; |
15 | }; | |
16 | ||
17 | typedef struct { | |
18 | HANDLE h; | |
6d0ef974 | 19 | WIN32_FIND_DATAW f; |
e97179b6 | 20 | struct git__dirent entry; |
0234c186 RJ |
21 | char *dir; |
22 | int first; | |
e97179b6 RJ |
23 | } git__DIR; |
24 | ||
e035685f VM |
25 | extern git__DIR *git__opendir(const char *); |
26 | extern struct git__dirent *git__readdir(git__DIR *); | |
74fa4bfa RB |
27 | extern int git__readdir_ext( |
28 | git__DIR *, struct git__dirent *, struct git__dirent **, int *); | |
e035685f VM |
29 | extern void git__rewinddir(git__DIR *); |
30 | extern int git__closedir(git__DIR *); | |
e97179b6 RJ |
31 | |
32 | # ifndef GIT__WIN32_NO_WRAP_DIR | |
87d9869f VM |
33 | # define dirent git__dirent |
34 | # define DIR git__DIR | |
35 | # define opendir git__opendir | |
36 | # define readdir git__readdir | |
74fa4bfa | 37 | # define readdir_r(d,e,r) git__readdir_ext((d),(e),(r),NULL) |
87d9869f VM |
38 | # define rewinddir git__rewinddir |
39 | # define closedir git__closedir | |
e97179b6 | 40 | # endif |
0234c186 | 41 | |
0234c186 | 42 | #endif /* INCLUDE_dir_h__ */ |