libdragon
dir.h
Go to the documentation of this file.
1
6#ifndef __LIBDRAGON_DIR_H
7#define __LIBDRAGON_DIR_H
8
9#include <stdint.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
25#define DT_REG 1
27#define DT_DIR 2
33typedef struct
34{
36 char d_name[256];
38 int d_type;
47 int64_t d_size;
49 uint32_t d_cookie;
50} dir_t;
51
67int dir_findfirst( const char * const path, dir_t *dir );
68
83int dir_findnext( const char * const path, dir_t *dir );
84
85#ifdef __cplusplus
86}
87#endif
88
89#endif
int dir_findnext(const char *const path, dir_t *dir)
Find the next file in a directory.
Definition: system.c:1254
int dir_findfirst(const char *const path, dir_t *dir)
Find the first file in a directory.
Definition: system.c:1219
int64_t d_size
Size of the file.
Definition: dir.h:47
uint32_t d_cookie
Opaque cookie used to continue walking.
Definition: dir.h:49
int d_type
The type of the directory entry. See DT_REG and DT_DIR.
Definition: dir.h:38
Directory entry structure.
Definition: dir.h:34