aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-09-15 21:43:36 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-09-19 11:45:53 +0200
commit273a5ef517dd6c3f8b795b1dacf40d5a83acbbcc (patch)
tree0ebe593877cbdb339aaca4659244d836aa4a38cb /include
parentdc28467db83432f19f004bb76f5e8515c71f8d0b (diff)
libsqfs: Add a SquashFS implementation of the dir_iterator_t
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r--include/sqfs/io.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/sqfs/io.h b/include/sqfs/io.h
index 91343d6..ce20da2 100644
--- a/include/sqfs/io.h
+++ b/include/sqfs/io.h
@@ -673,6 +673,30 @@ SQFS_API int sqfs_dir_iterator_create_recursive(sqfs_dir_iterator_t **out,
SQFS_API int sqfs_hard_link_filter_create(sqfs_dir_iterator_t **out,
sqfs_dir_iterator_t *base);
+/**
+ * @brief Create a directory iterator
+ *
+ * @memberof sqfs_dir_iterator_t
+ *
+ * @param rd A pointer to a directory reader
+ * @param id A pointer to an ID table
+ * @param data An optional pointer to a data reader. If this is NULL, the
+ * iterator cannot open files.
+ * @param xattr An optional pointer to an xattr reader. If this is NULL, the
+ * iterator will pretend that entries do not have extended
+ * attibutes.
+ * @param inode A pointer to a directory inode to open.
+ * @param out Returns a pointer to a iterator implementation on success.
+ *
+ * @return Zero on success, an @ref SQFS_ERROR code on failure.
+ */
+SQFS_API int sqfs_dir_iterator_create(sqfs_dir_reader_t *rd,
+ sqfs_id_table_t *id,
+ sqfs_data_reader_t *data,
+ sqfs_xattr_reader_t *xattr,
+ const sqfs_inode_generic_t *inode,
+ sqfs_dir_iterator_t **out);
+
#ifdef __cplusplus
}
#endif