libsquashfs  1.3.2
A new set of tools and libraries for working with SquashFS images
sqfs_readdir_state_t Struct Reference

Encapsulates state for simple directory reading. More...

#include <meta_reader.h>

Collaboration diagram for sqfs_readdir_state_t:

Public Member Functions

static SQFS_INLINE void sqfs_readdir_state_reset (sqfs_readdir_state_t *s)
 Rewind a directory state object back to its starting location. More...
 
SQFS_API int sqfs_readdir_state_init (sqfs_readdir_state_t *s, const sqfs_super_t *super, const sqfs_inode_generic_t *inode)
 Initialize a state object for reading a directory. More...
 

Data Fields

struct {
   sqfs_u64   block
 
   size_t   offset
 
   size_t   size
 
init
 
struct {
   sqfs_u64   block
 
   size_t   offset
 
   size_t   size
 
current
 
size_t entries
 
sqfs_u32 inum_base
 
sqfs_u64 inode_block
 

Detailed Description

Encapsulates state for simple directory reading.

Definition at line 56 of file meta_reader.h.

Member Function Documentation

◆ sqfs_readdir_state_init()

SQFS_API int sqfs_readdir_state_init ( sqfs_readdir_state_t s,
const sqfs_super_t super,
const sqfs_inode_generic_t inode 
)

Initialize a state object for reading a directory.

This function initializes a simple state object to point to the location of a directory header and store the total, uncompressed size of the directory.

The state object can be passed to sqfs_meta_reader_readdir to read entries one-by-one.

Parameters
sA pointer to the state object to initialize.
superA pointer to the super block, telling us where the directory table starts.
inodeA pointer to a directory inode from which to get the directory location.
Returns
Zero on success, an SQFS_ERROR value on failure (e.g. the inode is not a directory inode).

◆ sqfs_readdir_state_reset()

static SQFS_INLINE void sqfs_readdir_state_reset ( sqfs_readdir_state_t s)

Rewind a directory state object back to its starting location.

Parameters
itA pointer to the directory state.

Definition at line 76 of file meta_reader.h.


The documentation for this struct was generated from the following file: