Tizen RT Libs&Environment  v1.1 D4

Provides APIs for Directory Entries. More...

Collaboration diagram for DIRENT:

Files

file  dirent.h
 Directory entries APIs.
 

Data Structures

struct  dirent
 

Macros

#define DTYPE_FILE   0x01
 
#define DTYPE_CHR   0x02
 
#define DTYPE_BLK   0x04
 
#define DTYPE_DIRECTORY   0x08
 
#define DIRENT_ISFILE(dtype)   (((dtype) & DTYPE_FILE) != 0)
 
#define DIRENT_ISCHR(dtype)   (((dtype) & DTYPE_CHR) != 0)
 
#define DIRENT_ISBLK(dtype)   (((dtype) & DTYPE_BLK) != 0)
 
#define DIRENT_ISDIRECTORY(dtype)   (((dtype) & DTYPE_DIRECTORY) != 0)
 
#define EXTERN   extern
 

Typedefs

typedef void DIR
 

Functions

int closedir (FAR DIR *dirp)
 close a directory stream More...
 
FAR DIRopendir (FAR const char *path)
 open directory associated with file descriptor More...
 
FAR struct direntreaddir (FAR DIR *dirp)
 read a directory More...
 
int readdir_r (FAR DIR *dirp, FAR struct dirent *entry, FAR struct dirent **result)
 read a directory More...
 
void rewinddir (FAR DIR *dirp)
 reset the position of a directory stream to the beginning of a directory More...
 
void seekdir (FAR DIR *dirp, off_t loc)
 sets the location in the directory stream from which the next readdir() call will start. More...
 
off_t telldir (FAR DIR *dirp)
 gets the current location associated with the directory stream More...
 

Detailed Description

Provides APIs for Directory Entries.

Macro Definition Documentation

◆ DIRENT_ISBLK

#define DIRENT_ISBLK (   dtype)    (((dtype) & DTYPE_BLK) != 0)

Definition at line 92 of file dirent.h.

◆ DIRENT_ISCHR

#define DIRENT_ISCHR (   dtype)    (((dtype) & DTYPE_CHR) != 0)

Definition at line 91 of file dirent.h.

◆ DIRENT_ISDIRECTORY

#define DIRENT_ISDIRECTORY (   dtype)    (((dtype) & DTYPE_DIRECTORY) != 0)

Definition at line 93 of file dirent.h.

◆ DIRENT_ISFILE

#define DIRENT_ISFILE (   dtype)    (((dtype) & DTYPE_FILE) != 0)

Definition at line 90 of file dirent.h.

◆ DTYPE_BLK

#define DTYPE_BLK   0x04

Definition at line 87 of file dirent.h.

◆ DTYPE_CHR

#define DTYPE_CHR   0x02

Definition at line 86 of file dirent.h.

◆ DTYPE_DIRECTORY

#define DTYPE_DIRECTORY   0x08

Definition at line 88 of file dirent.h.

◆ DTYPE_FILE

#define DTYPE_FILE   0x01

Definition at line 85 of file dirent.h.

◆ EXTERN

#define EXTERN   extern

Definition at line 124 of file dirent.h.

Typedef Documentation

◆ DIR

typedef void DIR

Definition at line 109 of file dirent.h.

Function Documentation

◆ closedir()

int closedir ( FAR DIR dirp)

close a directory stream

#include <dirent.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ opendir()

FAR DIR* opendir ( FAR const char *  path)

open directory associated with file descriptor

#include <dirent.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ readdir()

FAR struct dirent* readdir ( FAR DIR dirp)

read a directory

#include <dirent.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ readdir_r()

int readdir_r ( FAR DIR dirp,
FAR struct dirent entry,
FAR struct dirent **  result 
)

read a directory

#include <dirent.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ rewinddir()

void rewinddir ( FAR DIR dirp)

reset the position of a directory stream to the beginning of a directory

#include <dirent.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ seekdir()

void seekdir ( FAR DIR dirp,
off_t  loc 
)

sets the location in the directory stream from which the next readdir() call will start.

#include <dirent.h>

Parameters
[in]dirpAn instance of type DIR.
[in]locoffset to seek.
Since
Tizen RT v1.0

◆ telldir()

off_t telldir ( FAR DIR dirp)

gets the current location associated with the directory stream

#include <dirent.h>

Parameters
[in]dirpAn instance of type DIR
Returns
On success, the current location in the directory stream is returned. On failure, -1 is returned and errno is set appropriately.
Since
Tizen RT v1.0