mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-24 02:59:01 +08:00
fs ls
This commit is contained in:
parent
dbc7b5e70b
commit
7f8cdf1e79
@ -988,7 +988,9 @@ enum { MG_FS_READ = 1, MG_FS_WRITE = 2, MG_FS_DIR = 4 };
|
||||
// stat(), write(), read() calls.
|
||||
struct mg_fs {
|
||||
int (*st)(const char *path, size_t *size, time_t *mtime); // stat file
|
||||
void (*ls)(const char *path, void (*fn)(const char *, void *), void *);
|
||||
void (*ls)(const char *path, void (*fn)(const char *, void *),
|
||||
void *); // List directory entries: call fn(file_name, fn_data)
|
||||
// for each directory entry
|
||||
void *(*op)(const char *path, int flags); // Open file
|
||||
void (*cl)(void *fd); // Close file
|
||||
size_t (*rd)(void *fd, void *buf, size_t len); // Read file
|
||||
|
4
src/fs.h
4
src/fs.h
@ -14,7 +14,9 @@ enum { MG_FS_READ = 1, MG_FS_WRITE = 2, MG_FS_DIR = 4 };
|
||||
// stat(), write(), read() calls.
|
||||
struct mg_fs {
|
||||
int (*st)(const char *path, size_t *size, time_t *mtime); // stat file
|
||||
void (*ls)(const char *path, void (*fn)(const char *, void *), void *);
|
||||
void (*ls)(const char *path, void (*fn)(const char *, void *),
|
||||
void *); // List directory entries: call fn(file_name, fn_data)
|
||||
// for each directory entry
|
||||
void *(*op)(const char *path, int flags); // Open file
|
||||
void (*cl)(void *fd); // Close file
|
||||
size_t (*rd)(void *fd, void *buf, size_t len); // Read file
|
||||
|
Loading…
Reference in New Issue
Block a user