diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/io/dir_iterator.h (renamed from include/util/dir_iterator.h) | 14 | ||||
-rw-r--r-- | include/io/dir_tree_iterator.h (renamed from include/util/dir_tree_iterator.h) | 16 |
2 files changed, 23 insertions, 7 deletions
diff --git a/include/util/dir_iterator.h b/include/io/dir_iterator.h index 4d7607f..7080d65 100644 --- a/include/util/dir_iterator.h +++ b/include/io/dir_iterator.h @@ -4,8 +4,8 @@ * * Copyright (C) 2023 David Oberhollenzer <goliath@infraroot.at> */ -#ifndef UTIL_DIR_ITERATOR_H -#define UTIL_DIR_ITERATOR_H +#ifndef IO_DIR_ITERATOR_H +#define IO_DIR_ITERATOR_H #include "sqfs/predef.h" @@ -34,6 +34,14 @@ typedef struct dir_iterator_t { struct dir_iterator_t **out); } dir_iterator_t; +#ifdef __cplusplus +extern "C" { +#endif + dir_iterator_t *dir_iterator_create(const char *path); -#endif /* UTIL_DIR_ITERATOR_H */ +#ifdef __cplusplus +} +#endif + +#endif /* IO_DIR_ITERATOR_H */ diff --git a/include/util/dir_tree_iterator.h b/include/io/dir_tree_iterator.h index 204f609..557178b 100644 --- a/include/util/dir_tree_iterator.h +++ b/include/io/dir_tree_iterator.h @@ -4,10 +4,10 @@ * * Copyright (C) 2023 David Oberhollenzer <goliath@infraroot.at> */ -#ifndef UTIL_DIR_TREE_ITERATOR_H -#define UTIL_DIR_TREE_ITERATOR_H +#ifndef IO_DIR_TREE_ITERATOR_H +#define IO_DIR_TREE_ITERATOR_H -#include "util/dir_iterator.h" +#include "io/dir_iterator.h" enum { DIR_SCAN_NO_SOCK = 0x0001, @@ -38,9 +38,17 @@ typedef struct { const char *name_pattern; } dir_tree_cfg_t; +#ifdef __cplusplus +extern "C" { +#endif + dir_iterator_t *dir_tree_iterator_create(const char *path, const dir_tree_cfg_t *cfg); void dir_tree_iterator_skip(dir_iterator_t *it); -#endif /* UTIL_DIR_TREE_ITERATOR_H */ +#ifdef __cplusplus +} +#endif + +#endif /* IO_DIR_TREE_ITERATOR_H */ |