aboutsummaryrefslogtreecommitdiff
path: root/arch/all/core/include/dirent.h
blob: 97c4051e5e4b566d8d033473a16ae13d733e8aa9 (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
/* ****************************************************************************
 * Directory listing.
 * ************************************************************************* */
#include <cdefs.h>
__BEGIN_DECLS

/* The directory stream */
struct _IO_DIR;
typedef struct _IO_DIR DIR;

/* The dirent structure */
struct dirent {
	unsigned short int d_reclen;
	unsigned char      d_type;
	char               d_name[256];
};

/* open and close the directory stream */
extern __nonnull(1, __path) __wur
DIR *opendir _OF((const char __path[__notnull]))
	__THROW;

extern __nonnull(1, __stream)
int closedir _OF((DIR *__stream))
	__THROW;

/* read from directory */
extern __nonnull(1, __stream)
struct dirent *readdir _OF((DIR *__stream))
	__THROW;

/* move in directory */
extern __nonnull(1, __stream)
void seekdir _OF((DIR *__stream, long __index)) __THROW;

extern __nonnull(1, __stream)
long telldir _OF((DIR *__stream)) __THROW;

extern __nonnull(1, __stream)
void rewinddir _OF((DIR *__stream)) __THROW;

__END_DECLS