20 #ifndef SQFS_DIR_READER_H 21 #define SQFS_DIR_READER_H 105 SQFS_TREE_ALL_FLAGS = 0x7F,
173 SQFS_DIR_READER_ALL_FLAGS = 0x00000001,
193 SQFS_DIR_OPEN_ALL_FLAGS = 0x00000001,
sqfs_tree_node_t * children
For directories, a linked list of children.
SQFS_API void sqfs_dir_tree_destroy(sqfs_tree_node_t *root)
Recursively destroy a tree of sqfs_tree_node_t nodes.
Omit empty directories from the final tree.
Omit socket files from the final tree.
SQFS_API int sqfs_dir_reader_get_inode(sqfs_dir_reader_t *rd, sqfs_inode_generic_t **inode)
Read the inode that the current directory entry points to.
SQFS_API int sqfs_dir_reader_get_full_hierarchy(sqfs_dir_reader_t *rd, const sqfs_id_table_t *idtbl, const char *path, sqfs_u32 flags, sqfs_tree_node_t **out)
High level helper function for deserializing the entire file system hierarchy into an in-memory tree ...
Encapsultes a compressor with a simple interface to compress or extract chunks of data...
Store the list of parent nodes all the way to the target node.
Omit symbolic links from the final tree.
The SquashFS super block, located at the beginning of the file system to describe the layout of the f...
Encapsulates a node in the filesystem tree read by sqfs_dir_reader_get_full_hierarchy.
Abstracts file I/O to make it easy to embedd SquashFS.
sqfs_inode_generic_t * inode
Inode representing this element in the tree.
sqfs_tree_node_t * next
Linked list next pointer for children list.
SQFS_API int sqfs_dir_reader_open_dir(sqfs_dir_reader_t *rd, const sqfs_inode_generic_t *inode, sqfs_u32 flags)
Navigate a directory reader to the location of a directory represented by an inode.
sqfs_tree_node_t * parent
Pointer to parent, NULL for the root node.
SQFS_API int sqfs_dir_reader_read(sqfs_dir_reader_t *rd, sqfs_dir_entry_t **out)
Read a directory entry and advance the internal position indicator to the next one.
Omit named pipes from the final tree.
SQFS_API int sqfs_dir_reader_rewind(sqfs_dir_reader_t *rd)
Reset a directory reader back to the beginning of the listing.
Do not recurse into sub directories.
SQFS_API sqfs_dir_reader_t * sqfs_dir_reader_create(const sqfs_super_t *super, sqfs_compressor_t *cmp, sqfs_file_t *file, sqfs_u32 flags)
Create a directory reader.
SQFS_DIR_READER_FLAGS
Flags for sqfs_dir_reader_create.
SQFS_DIR_OPEN_FLAGS
Flags for sqfs_dir_reader_open_dir.
Abstracts reading of directory entries.
sqfs_u32 uid
Resolved 32 bit user ID from the inode.
A simple data structure that encapsulates ID to index mapping for user and group IDs.
Do not generate "." and ".." entries.
Support "." and ".." directory and path entries.
SQFS_TREE_FILTER_FLAGS
Filter flags for sqfs_dir_reader_get_full_hierarchy.
On-disk data structure of a directory entry. Many of these follow a single sqfs_dir_header_t.
sqfs_u32 gid
Resolved 32 bit group ID from the inode.
Includes forward declarations of data structures, macros and integer types.
Omit device special files from the final tree.
SQFS_API int sqfs_dir_reader_get_root_inode(sqfs_dir_reader_t *rd, sqfs_inode_generic_t **inode)
Read the root inode using the location given by the super block.
SQFS_API int sqfs_dir_reader_find_by_path(sqfs_dir_reader_t *rd, const sqfs_inode_generic_t *start, const char *path, sqfs_inode_generic_t **out)
Find an inode through path traversal starting from the root or a given node downwards.
SQFS_API int sqfs_dir_reader_find(sqfs_dir_reader_t *rd, const char *name)
Seek through the current directory listing to locate an entry by name.
A generic inode structure that combines all others and provides additional information.
sqfs_u8 name[]
null-terminated entry name.
SQFS_API int sqfs_tree_node_get_path(const sqfs_tree_node_t *node, char **out)
Recursively destroy a tree of sqfs_tree_node_t nodes.