Temporary code
[reactos.git] / posix / include / dirent.h
1 /* $Id: dirent.h,v 1.4 2002/05/17 01:47:13 hyperion Exp $
2 */
3 /*
4 * dirent.h
5 *
6 * format of directory entries. Conforming to the Single UNIX(r)
7 * Specification Version 2, System Interface & Headers Issue 5
8 *
9 * This file is part of the ReactOS Operating System.
10 *
11 * Contributors:
12 * Created by KJK::Hyperion <noog@libero.it>
13 *
14 * THIS SOFTWARE IS NOT COPYRIGHTED
15 *
16 * This source code is offered for use in the public domain. You may
17 * use, modify or distribute it freely.
18 *
19 * This code is distributed in the hope that it will be useful but
20 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
21 * DISCLAMED. This includes but is not limited to warranties of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23 *
24 */
25 #ifndef __DIRENT_H_INCLUDED__
26 #define __DIRENT_H_INCLUDED__
27
28 /* INCLUDES */
29 #include <sys/types.h>
30 #include <stddef.h>
31 #include <limits.h>
32
33 /* TYPES */
34 typedef void DIR;
35
36 #define NAME_MAX (255)
37
38 struct dirent
39 {
40 ino_t d_ino; /* file serial number */
41 char * d_name /* [NAME_MAX + 1] */; /* name of entry */
42 };
43
44 /* for Unicode filenames */
45 struct _Wdirent
46 {
47 ino_t d_ino; /* file serial number */
48 wchar_t * d_name/* [NAME_MAX + 1] */; /* name of entry */
49 };
50
51 /* CONSTANTS */
52
53 /* PROTOTYPES */
54 int closedir(DIR *);
55 DIR *opendir(const char *);
56 struct dirent *readdir(DIR *);
57 int readdir_r(DIR *, struct dirent *, struct dirent **);
58 void rewinddir(DIR *);
59 void seekdir(DIR *, long int);
60 long int telldir(DIR *);
61
62 /* for Unicode filenames */
63 DIR *_Wopendir(const wchar_t *);
64 struct _Wdirent *_Wreaddir(DIR *);
65 int _Wreaddir_r(DIR *, struct _Wdirent *, struct _Wdirent **);
66
67
68 /* MACROS */
69
70 #endif /* __DIRENT_H_INCLUDED__ */
71
72 /* EOF */
73