summaryrefslogtreecommitdiff
path: root/src/dir.h
blob: 62ee0b89958479ae19eb68f18bb23de238a6a2f0 (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
#ifndef INCLUDE_dir_h__
#define INCLUDE_dir_h__

#include "common.h"

#ifndef GIT_WIN32
# include <dirent.h>
#endif

#ifdef GIT_WIN32

struct dirent {
	int  d_ino;
	char d_name[261];
};

typedef struct {
	HANDLE h;
	WIN32_FIND_DATA f;
	struct dirent entry;
	char *dir;
	int first;
} DIR;

extern DIR *opendir(const char *);
extern struct dirent *readdir(DIR *);
extern void rewinddir(DIR *);
extern int closedir(DIR *);

#endif

#endif /* INCLUDE_dir_h__ */