sl@0: /* sl@0: * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: sl@0: #ifndef _SYS_DIRENT_H_ sl@0: #define _SYS_DIRENT_H_ sl@0: sl@0: #ifdef __cplusplus sl@0: extern "C" { sl@0: #endif sl@0: sl@0: #include sl@0: sl@0: typedef struct __EPOC32_DIR DIR; sl@0: typedef struct __EPOC32_WDIR WDIR; sl@0: sl@0: IMPORT_C DIR *opendir (const char *); sl@0: IMPORT_C WDIR *wopendir (const wchar_t *); sl@0: IMPORT_C struct dirent *readdir (DIR *); sl@0: IMPORT_C struct wdirent *wreaddir (WDIR *); sl@0: IMPORT_C void rewinddir (DIR *); sl@0: IMPORT_C int closedir (DIR *); sl@0: IMPORT_C void wrewinddir (WDIR *); sl@0: IMPORT_C int wclosedir (WDIR *); sl@0: sl@0: /** sl@0: telldir and seekdir aren't required by POSIX sl@0: */ sl@0: IMPORT_C off_t telldir(const DIR *); sl@0: IMPORT_C void seekdir(DIR *,off_t); sl@0: IMPORT_C off_t wtelldir(const WDIR *); sl@0: IMPORT_C void wseekdir(WDIR *,off_t); sl@0: sl@0: #define __MAXNAMLEN 255 sl@0: sl@0: #define d_ino d_fileno /* compatibility */ sl@0: sl@0: struct dirent { sl@0: unsigned long d_fileno; sl@0: unsigned short d_namlen; sl@0: char* d_name; sl@0: }; sl@0: sl@0: struct wdirent { sl@0: unsigned long d_fileno; sl@0: unsigned short d_namlen; sl@0: wchar_t* d_name; sl@0: }; sl@0: sl@0: #include sl@0: IMPORT_C DIR *_opendir_r (struct _reent*, const char *); sl@0: IMPORT_C WDIR *_wopendir_r (struct _reent*, const wchar_t *); sl@0: IMPORT_C struct dirent *_readdir_r(struct _reent*, DIR *); sl@0: #ifdef __cplusplus sl@0: } sl@0: #endif sl@0: #endif /* !_SYS_DIRENT_H_ */