added:
dir -> directory walker similar to dirent
dirwatch -> lets you watch a directory for changes in another thread
vec -> generic vector
This commit is contained in:
parent
aa08240ec9
commit
59b55c7f6c
26 changed files with 4037 additions and 2726 deletions
29
dir.h
Normal file
29
dir.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#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
|
||||
Loading…
Add table
Add a link
Reference in a new issue