epoc32/include/libc/sys/dirent.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:
    15 *
    16 */
    17 
    18 
    19 
    20 
    21 
    22 
    23 /**
    24  @file
    25  @publishedAll
    26  @released
    27 */
    28 
    29 #ifndef _SYS_DIRENT_H_
    30 #define _SYS_DIRENT_H_
    31 
    32 #ifdef __cplusplus
    33 extern "C" {
    34 #endif
    35 
    36 #include <sys/types.h>
    37 
    38 typedef struct __EPOC32_DIR DIR;
    39 typedef struct __EPOC32_WDIR WDIR;
    40 
    41 IMPORT_C DIR *opendir (const char *);
    42 IMPORT_C WDIR *wopendir (const wchar_t *);
    43 IMPORT_C struct dirent *readdir (DIR *);
    44 IMPORT_C struct wdirent *wreaddir (WDIR *);
    45 IMPORT_C void rewinddir (DIR *);
    46 IMPORT_C int closedir (DIR *);
    47 IMPORT_C void wrewinddir (WDIR *);
    48 IMPORT_C int wclosedir (WDIR *);
    49 
    50 /** 
    51 telldir and seekdir aren't required by POSIX 
    52 */
    53 IMPORT_C off_t telldir(const DIR *);
    54 IMPORT_C void seekdir(DIR *,off_t);
    55 IMPORT_C off_t wtelldir(const WDIR *);
    56 IMPORT_C void wseekdir(WDIR *,off_t);
    57 
    58 #define __MAXNAMLEN	255
    59 
    60 #define d_ino	d_fileno	/* compatibility */
    61 
    62 struct dirent {
    63 	unsigned long	d_fileno;
    64 	unsigned short	d_namlen;
    65 	char*		d_name;
    66 };
    67 
    68 struct wdirent {
    69 	unsigned long	d_fileno;
    70 	unsigned short	d_namlen;
    71 	wchar_t*		d_name;
    72 };
    73 
    74 #include <sys/reent.h>
    75 IMPORT_C DIR *_opendir_r (struct _reent*, const char *);
    76 IMPORT_C WDIR *_wopendir_r (struct _reent*, const wchar_t *);
    77 IMPORT_C struct dirent *_readdir_r(struct _reent*, DIR *);
    78 #ifdef __cplusplus
    79 }
    80 #endif
    81 #endif /* !_SYS_DIRENT_H_ */