From de20d7430df08731d9108acb83e1234ba7f1fe16 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sat, 19 Sep 2020 14:53:29 -0400 Subject: file manager --- src/user/include/knob/file.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/user/include/knob/file.h') diff --git a/src/user/include/knob/file.h b/src/user/include/knob/file.h index a0d084f..8862098 100644 --- a/src/user/include/knob/file.h +++ b/src/user/include/knob/file.h @@ -2,6 +2,7 @@ #define KNOB_FILE_H #include +#include struct file; @@ -9,7 +10,6 @@ const char *remove_prefix(const char *path, uint8_t *dn_out); struct file *open_file(const char *path); void close_file(struct file *f); -void _close_all_files(); uint32_t read_from_file(struct file *f, uint32_t max, void *buf); //return value and max_length don't include null terminator @@ -19,4 +19,7 @@ int32_t seek_file_by(struct file *f, int32_t by); uint32_t file_size(struct file *f) __attribute__ ((pure)); +//return value must be manually freed, unless it is a null pointer +_dir_info_entry_t *get_directory_info(const char *path, uint32_t *count_out); + #endif \ No newline at end of file -- cgit v1.2.3