Welcome to NYCU CSIT Mirror site

Iterator: libsmartcols Reference Manual

Iterator

Iterator — unified iterator

Functions

Types and Values

struct libscols_iter

Description

The iterator keeps the direction and the last position for access to the internal library tables/lists.

Functions

scols_free_iter ()

void
scols_free_iter (struct libscols_iter *itr);

Deallocates the iterator.

Parameters

itr

iterator pointer

 

scols_iter_get_direction ()

int
scols_iter_get_direction (const struct libscols_iter *itr);

Parameters

itr

iterator pointer

 

Returns

SCOLS_INTER_{FOR,BACK}WARD


scols_new_iter ()

struct libscols_iter *
scols_new_iter (int direction);

Parameters

direction

SCOLS_INTER_{FOR,BACK}WARD direction

 

Returns

newly allocated generic libmount iterator.


scols_reset_iter ()

void
scols_reset_iter (struct libscols_iter *itr,
                  int direction);

Resets the iterator.

Parameters

itr

iterator pointer

 

direction

SCOLS_INTER_{FOR,BACK}WARD or -1 to keep the direction unchanged

 

Types and Values

struct libscols_iter

struct libscols_iter;

Generic iterator