libdragon
Loading...
Searching...
No Matches
dir.h
Go to the documentation of this file.
1
8#ifndef __LIBDRAGON_DIR_H
9#define __LIBDRAGON_DIR_H
10
11#include <stdint.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
27#define DT_REG 1
29#define DT_DIR 2
35typedef struct
36{
38 char d_name[256];
40 int d_type;
49 int64_t d_size;
51 uint32_t d_cookie;
52} dir_t;
53
69int dir_findfirst( const char * const path, dir_t *dir );
70
85int dir_findnext( const char * const path, dir_t *dir );
86
87#ifdef __cplusplus
88}
89#endif
90
91#endif
int dir_findnext(const char *const path, dir_t *dir)
Find the next file in a directory.
Definition system.c:1244
int dir_findfirst(const char *const path, dir_t *dir)
Find the first file in a directory.
Definition system.c:1218
int64_t d_size
Size of the file.
Definition dir.h:49
uint32_t d_cookie
Opaque cookie used to continue walking.
Definition dir.h:51
int d_type
The type of the directory entry. See DT_REG and DT_DIR.
Definition dir.h:40
Directory entry structure.
Definition dir.h:36