libsquashfs: sqfs_readdir_state_t Struct Reference

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

Loading...
Searching...
No Matches
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
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.

## Static 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.

## 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

  s | A pointer to the state object to initialize.
  super | A pointer to the super block, telling us where the directory table starts.
  inode | A 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()

SQFS_INLINE void sqfs_readdir_state_reset | ( | sqfs_readdir_state_t * | s | ) |
| static

Rewind a directory state object back to its starting location.

Parameters

  it | A pointer to the directory state.

Definition at line 76 of file meta_reader.h.

## Field Documentation

## ◆ block

sqfs_u64 block

Definition at line 58 of file meta_reader.h.

## ◆ entries

size_t entries

Definition at line 63 of file meta_reader.h.

## ◆ inode_block

sqfs_u64 inode_block

Definition at line 66 of file meta_reader.h.

## ◆ inum_base

sqfs_u32 inum_base

Definition at line 65 of file meta_reader.h.

## ◆ offset

size_t offset

Definition at line 59 of file meta_reader.h.

## ◆ size

size_t size

Definition at line 60 of file meta_reader.h.

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

- include/sqfs/meta_reader.h