|
1 /* |
|
2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 /** |
|
21 @file |
|
22 @publishedAll |
|
23 @released |
|
24 */ |
|
25 |
|
26 #ifndef _SYS_DIRENT_H_ |
|
27 #define _SYS_DIRENT_H_ |
|
28 |
|
29 #ifdef __cplusplus |
|
30 extern "C" { |
|
31 #endif |
|
32 |
|
33 #include <sys/types.h> |
|
34 |
|
35 typedef struct __EPOC32_DIR DIR; |
|
36 typedef struct __EPOC32_WDIR WDIR; |
|
37 |
|
38 IMPORT_C DIR *opendir (const char *); |
|
39 IMPORT_C WDIR *wopendir (const wchar_t *); |
|
40 IMPORT_C struct dirent *readdir (DIR *); |
|
41 IMPORT_C struct wdirent *wreaddir (WDIR *); |
|
42 IMPORT_C void rewinddir (DIR *); |
|
43 IMPORT_C int closedir (DIR *); |
|
44 IMPORT_C void wrewinddir (WDIR *); |
|
45 IMPORT_C int wclosedir (WDIR *); |
|
46 |
|
47 /** |
|
48 telldir and seekdir aren't required by POSIX |
|
49 */ |
|
50 IMPORT_C off_t telldir(const DIR *); |
|
51 IMPORT_C void seekdir(DIR *,off_t); |
|
52 IMPORT_C off_t wtelldir(const WDIR *); |
|
53 IMPORT_C void wseekdir(WDIR *,off_t); |
|
54 |
|
55 #define __MAXNAMLEN 255 |
|
56 |
|
57 #define d_ino d_fileno /* compatibility */ |
|
58 |
|
59 struct dirent { |
|
60 unsigned long d_fileno; |
|
61 unsigned short d_namlen; |
|
62 char* d_name; |
|
63 }; |
|
64 |
|
65 struct wdirent { |
|
66 unsigned long d_fileno; |
|
67 unsigned short d_namlen; |
|
68 wchar_t* d_name; |
|
69 }; |
|
70 |
|
71 #include <sys/reent.h> |
|
72 IMPORT_C DIR *_opendir_r (struct _reent*, const char *); |
|
73 IMPORT_C WDIR *_wopendir_r (struct _reent*, const wchar_t *); |
|
74 IMPORT_C struct dirent *_readdir_r(struct _reent*, DIR *); |
|
75 #ifdef __cplusplus |
|
76 } |
|
77 #endif |
|
78 #endif /* !_SYS_DIRENT_H_ */ |