dir -> directory walker similar to dirent
dirwatch -> lets you watch a directory for changes in another thread
vec -> generic vector
29 lines
No EOL
387 B
C
29 lines
No EOL
387 B
C
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "str.h"
|
|
|
|
typedef void *dir_t;
|
|
|
|
typedef struct {
|
|
int type;
|
|
str_t name;
|
|
} dir_entry_t;
|
|
|
|
enum {
|
|
FS_TYPE_UNKNOWN,
|
|
FS_TYPE_FILE,
|
|
FS_TYPE_DIR,
|
|
};
|
|
|
|
dir_t dirOpen(const char *path);
|
|
void dirClose(dir_t ctx);
|
|
|
|
dir_entry_t *dirNext(dir_t ctx);
|
|
|
|
#ifdef __cplusplus
|
|
} // extern "C"
|
|
#endif |