From 7f8cdf1e79f609e834f59f247b69b51bc7444c9e Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Fri, 1 Dec 2023 20:43:39 -0300 Subject: [PATCH] fs ls --- mongoose.h | 4 +++- src/fs.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mongoose.h b/mongoose.h index 495d07178c..08a9bdffa2 100644 --- a/mongoose.h +++ b/mongoose.h @@ -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 diff --git a/src/fs.h b/src/fs.h index 100295296f..a5fa31d906 100644 --- a/src/fs.h +++ b/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