PSX: The tool to build internal system calls tables and auxiliary C files.
[reactos.git] / posix / include / dirent.h
1 /* $Id: dirent.h,v 1.3 2002/03/22 01:26:28 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 struct dirent
37 {
38 ino_t d_ino; /* file serial number */
39 char d_name[NAME_MAX + 1]; /* name of entry */
40 };
41
42 /* for Unicode filenames */
43 struct _Wdirent
44 {
45 ino_t d_ino; /* file serial number */
46 wchar_t d_name[NAME_MAX + 1]; /* name of entry */
47 };
48
49 /* CONSTANTS */
50
51 /* PROTOTYPES */
52 int closedir(DIR *);
53 DIR *opendir(const char *);
54 struct dirent *readdir(DIR *);
55 int readdir_r(DIR *, struct dirent *, struct dirent **);
56 void rewinddir(DIR *);
57 void seekdir(DIR *, long int);
58 long int telldir(DIR *);
59
60 /* for Unicode filenames */
61 DIR *_Wopendir(const wchar_t *);
62 struct _Wdirent *_Wreaddir(DIR *);
63 int _Wreaddir_r(DIR *, struct _Wdirent *, struct _Wdirent **);
64
65
66 /* MACROS */
67
68 #endif /* __DIRENT_H_INCLUDED__ */
69
70 /* EOF */
71