Tenok
A Linux-like Real-Time Operating System for Robotics and Internet of Things
Data Structures | Typedefs | Functions
dirent.h File Reference
#include <stdint.h>
#include <sys/limits.h>
#include "kconfig.h"
Include dependency graph for dirent.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dirstream
 
struct  dirent
 

Typedefs

typedef struct dirstream DIR
 

Functions

int opendir (const char *name, DIR *dir)
 Open a directory stream corresponding to the directory name, and returns a pointer to the directory stream. More...
 
int readdir (DIR *dirp, struct dirent *dirent)
 Return a pointer to a dirent structure representing the next directory entry in the directory stream pointed to by dirp. More...
 

Function Documentation

◆ opendir()

int opendir ( const char *  name,
DIR dir 
)

Open a directory stream corresponding to the directory name, and returns a pointer to the directory stream.

Parameters
nameThe file path to the directory.
dirThe directory stream to return.
Return values
int0 on success and nonzero error number on error.

◆ readdir()

int readdir ( DIR dirp,
struct dirent dirent 
)

Return a pointer to a dirent structure representing the next directory entry in the directory stream pointed to by dirp.

Parameters
dirpPointer to the dirent object.
direntThe structure of file entries under the directory to return.
Return values
int0 on success and nonzero error number on error.