libisofs
1.5.4
About: libisofs is a library to create an ISO 9660 filesystem, supports extensions like RockRidge or Joliet, makes bootable ISO 9660, and records file attributes which are of interest for data backups.
![]() ![]() |
Go to the source code of this file.
Data Structures | |
struct | iso_find_condition |
struct | find_iter_data |
struct | cond_times |
struct | logical_binary_conditions |
Functions | |
static int | get_next (struct find_iter_data *iter, IsoNode **n) |
static void | update_next (IsoDirIter *iter) |
static int | find_iter_next (IsoDirIter *iter, IsoNode **node) |
static int | find_iter_has_next (IsoDirIter *iter) |
static void | find_iter_free (IsoDirIter *iter) |
static int | find_iter_take (IsoDirIter *iter) |
static int | find_iter_remove (IsoDirIter *iter) |
void | find_notify_child_taken (IsoDirIter *iter, IsoNode *node) |
int | iso_dir_find_children (IsoDir *dir, IsoFindCondition *cond, IsoDirIter **iter) |
Find all directory children that match the given condition. More... | |
static int | cond_name_matches (IsoFindCondition *cond, IsoNode *node) |
static void | cond_name_free (IsoFindCondition *cond) |
IsoFindCondition * | iso_new_find_conditions_name (const char *wildcard) |
Create a new condition that checks if the node name matches the given wildcard. More... | |
static int | cond_mode_matches (IsoFindCondition *cond, IsoNode *node) |
static void | cond_mode_free (IsoFindCondition *cond) |
IsoFindCondition * | iso_new_find_conditions_mode (mode_t mask) |
Create a new condition that checks the node mode against a mode mask. More... | |
static int | cond_gid_matches (IsoFindCondition *cond, IsoNode *node) |
static void | cond_gid_free (IsoFindCondition *cond) |
IsoFindCondition * | iso_new_find_conditions_gid (gid_t gid) |
Create a new condition that checks the node gid. More... | |
static int | cond_uid_matches (IsoFindCondition *cond, IsoNode *node) |
static void | cond_uid_free (IsoFindCondition *cond) |
IsoFindCondition * | iso_new_find_conditions_uid (uid_t uid) |
Create a new condition that checks the node uid. More... | |
static int | cond_time_matches (IsoFindCondition *cond, IsoNode *node) |
static void | cond_time_free (IsoFindCondition *cond) |
IsoFindCondition * | iso_new_find_conditions_atime (time_t time, enum iso_find_comparisons comparison) |
Create a new condition that checks the time of last access. More... | |
IsoFindCondition * | iso_new_find_conditions_mtime (time_t time, enum iso_find_comparisons comparison) |
Create a new condition that checks the time of last modification. More... | |
IsoFindCondition * | iso_new_find_conditions_ctime (time_t time, enum iso_find_comparisons comparison) |
Create a new condition that checks the time of last status change. More... | |
static void | cond_logical_binary_free (IsoFindCondition *cond) |
static int | cond_logical_and_matches (IsoFindCondition *cond, IsoNode *node) |
IsoFindCondition * | iso_new_find_conditions_and (IsoFindCondition *a, IsoFindCondition *b) |
Create a new condition that check if the two given conditions are valid. More... | |
static int | cond_logical_or_matches (IsoFindCondition *cond, IsoNode *node) |
IsoFindCondition * | iso_new_find_conditions_or (IsoFindCondition *a, IsoFindCondition *b) |
Create a new condition that check if at least one the two given conditions is valid. More... | |
static void | cond_not_free (IsoFindCondition *cond) |
static int | cond_not_matches (IsoFindCondition *cond, IsoNode *node) |
IsoFindCondition * | iso_new_find_conditions_not (IsoFindCondition *negate) |
Create a new condition that check if the given conditions is false. More... | |
Variables | |
static struct iso_dir_iter_iface | find_iter_class |
|
static |
Definition at line 396 of file find.c.
References find_iter_data::cond, and iso_find_condition::data.
Referenced by iso_new_find_conditions_gid().
|
static |
Definition at line 389 of file find.c.
References find_iter_data::cond, iso_find_condition::data, and Iso_Node::gid.
Referenced by iso_new_find_conditions_gid().
|
static |
Definition at line 650 of file find.c.
References logical_binary_conditions::a, logical_binary_conditions::b, iso_find_condition::data, and iso_find_condition::matches.
Referenced by iso_new_find_conditions_and().
|
static |
Definition at line 638 of file find.c.
References logical_binary_conditions::a, logical_binary_conditions::b, iso_find_condition::data, and iso_find_condition::free.
Referenced by iso_new_find_conditions_and(), and iso_new_find_conditions_or().
|
static |
Definition at line 691 of file find.c.
References logical_binary_conditions::a, logical_binary_conditions::b, iso_find_condition::data, and iso_find_condition::matches.
Referenced by iso_new_find_conditions_or().
|
static |
Definition at line 344 of file find.c.
References find_iter_data::cond, and iso_find_condition::data.
Referenced by iso_new_find_conditions_mode().
|
static |
Definition at line 337 of file find.c.
References find_iter_data::cond, iso_find_condition::data, and Iso_Node::mode.
Referenced by iso_new_find_conditions_mode().
|
static |
Definition at line 303 of file find.c.
References find_iter_data::cond, and iso_find_condition::data.
Referenced by iso_new_find_conditions_name().
|
static |
Definition at line 295 of file find.c.
References find_iter_data::cond, iso_find_condition::data, and Iso_Node::name.
Referenced by iso_new_find_conditions_name().
|
static |
Definition at line 732 of file find.c.
References iso_find_condition::data, and iso_find_condition::free.
Referenced by iso_new_find_conditions_not().
|
static |
Definition at line 740 of file find.c.
References iso_find_condition::data, and iso_find_condition::matches.
Referenced by iso_new_find_conditions_not().
|
static |
Definition at line 514 of file find.c.
References iso_find_condition::data.
Referenced by iso_new_find_conditions_atime(), iso_new_find_conditions_ctime(), and iso_new_find_conditions_mtime().
|
static |
Definition at line 486 of file find.c.
References Iso_Node::atime, cond_times::comparison, Iso_Node::ctime, iso_find_condition::data, ISO_FIND_COND_EQUAL, ISO_FIND_COND_GREATER, ISO_FIND_COND_GREATER_OR_EQUAL, ISO_FIND_COND_LESS, ISO_FIND_COND_LESS_OR_EQUAL, Iso_Node::mtime, cond_times::time, and cond_times::what_time.
Referenced by iso_new_find_conditions_atime(), iso_new_find_conditions_ctime(), and iso_new_find_conditions_mtime().
|
static |
Definition at line 441 of file find.c.
References find_iter_data::cond, and iso_find_condition::data.
Referenced by iso_new_find_conditions_uid().
|
static |
Definition at line 434 of file find.c.
References find_iter_data::cond, iso_find_condition::data, and Iso_Node::uid.
Referenced by iso_new_find_conditions_uid().
|
static |
Definition at line 168 of file find.c.
References find_iter_data::cond, find_iter_data::current, Iso_Dir_Iter::data, find_iter_data::dir, iso_find_condition::free, find_iter_data::free_cond, iso_dir_iter_free(), iso_node_unref(), find_iter_data::iter, and find_iter_data::prev.
|
static |
Definition at line 160 of file find.c.
References find_iter_data::current, Iso_Dir_Iter::data, and find_iter_data::iter.
|
static |
Definition at line 142 of file find.c.
References find_iter_data::current, Iso_Dir_Iter::data, find_iter_data::err, ISO_NULL_POINTER, ISO_SUCCESS, find_iter_data::iter, and update_next().
|
static |
Definition at line 203 of file find.c.
References Iso_Dir_Iter::data, ISO_ERROR, iso_node_remove(), find_iter_data::iter, and find_iter_data::prev.
|
static |
Definition at line 192 of file find.c.
References Iso_Dir_Iter::data, ISO_ERROR, iso_node_take(), find_iter_data::iter, and find_iter_data::prev.
void find_notify_child_taken | ( | IsoDirIter * | iter, |
IsoNode * | node | ||
) |
|
static |
Definition at line 56 of file find.c.
References find_iter_data::cond, Iso_Dir_Iter::data, find_iter_data::free_cond, iso_dir_find_children(), iso_dir_iter_free(), iso_dir_iter_next(), ISO_NODE_IS_DIR, ISO_SUCCESS, find_iter_data::iter, find_iter_data::itersec, and iso_find_condition::matches.
Referenced by update_next().
int iso_dir_find_children | ( | IsoDir * | dir, |
IsoFindCondition * | cond, | ||
IsoDirIter ** | iter | ||
) |
Find all directory children that match the given condition.
dir | Directory where we will search children. |
cond | Condition that the children must match in order to be returned. It will be free together with the iterator. Remember to delete it if this function return error. |
iter | Iterator that returns only the children that match condition. |
Definition at line 238 of file find.c.
References Iso_Dir_Iter::class, find_iter_data::cond, find_iter_data::current, Iso_Dir_Iter::data, find_iter_data::dir, Iso_Dir_Iter::dir, find_iter_data::err, find_iter_class, find_iter_data::free_cond, iso_dir_get_children(), iso_dir_iter_register(), iso_node_ref(), ISO_NULL_POINTER, ISO_OUT_OF_MEM, ISO_SUCCESS, find_iter_data::iter, find_iter_data::itersec, find_iter_data::prev, and update_next().
Referenced by get_next(), and update_next().
IsoFindCondition* iso_new_find_conditions_and | ( | IsoFindCondition * | a, |
IsoFindCondition * | b | ||
) |
Create a new condition that check if the two given conditions are valid.
a | |
b | IsoFindCondition to compare |
Definition at line 668 of file find.c.
References logical_binary_conditions::a, logical_binary_conditions::b, cond_logical_and_matches(), cond_logical_binary_free(), iso_find_condition::data, iso_find_condition::free, and iso_find_condition::matches.
IsoFindCondition* iso_new_find_conditions_atime | ( | time_t | time, |
enum iso_find_comparisons | comparison | ||
) |
Create a new condition that checks the time of last access.
time | Time to compare against IsoNode atime. |
comparison | Comparison to be done between IsoNode atime and submitted time. Note that ISO_FIND_COND_GREATER, for example, is true if the node time is greater than the submitted time. |
Definition at line 533 of file find.c.
References cond_times::comparison, cond_time_free(), cond_time_matches(), iso_find_condition::data, iso_find_condition::free, iso_find_condition::matches, cond_times::time, and cond_times::what_time.
IsoFindCondition* iso_new_find_conditions_ctime | ( | time_t | time, |
enum iso_find_comparisons | comparison | ||
) |
Create a new condition that checks the time of last status change.
time | Time to compare against IsoNode ctime. |
comparison | Comparison to be done between IsoNode ctime and submitted time. Note that ISO_FIND_COND_GREATER, for example, is true if the node time is greater than the submitted time. |
Definition at line 607 of file find.c.
References cond_times::comparison, cond_time_free(), cond_time_matches(), iso_find_condition::data, iso_find_condition::free, iso_find_condition::matches, cond_times::time, and cond_times::what_time.
IsoFindCondition* iso_new_find_conditions_gid | ( | gid_t | gid | ) |
Create a new condition that checks the node gid.
gid | Desired Group Id. |
Definition at line 411 of file find.c.
References find_iter_data::cond, cond_gid_free(), cond_gid_matches(), iso_find_condition::data, iso_find_condition::free, and iso_find_condition::matches.
IsoFindCondition* iso_new_find_conditions_mode | ( | mode_t | mask | ) |
Create a new condition that checks the node mode against a mode mask.
It can be used to check both file type and permissions.
For example:
iso_new_find_conditions_mode(S_IFREG) : search for regular files iso_new_find_conditions_mode(S_IFCHR | S_IWUSR) : search for character devices where owner has write permissions.
mask | Mode mask to AND against node mode. |
Definition at line 366 of file find.c.
References find_iter_data::cond, cond_mode_free(), cond_mode_matches(), iso_find_condition::data, iso_find_condition::free, and iso_find_condition::matches.
IsoFindCondition* iso_new_find_conditions_mtime | ( | time_t | time, |
enum iso_find_comparisons | comparison | ||
) |
Create a new condition that checks the time of last modification.
time | Time to compare against IsoNode mtime. |
comparison | Comparison to be done between IsoNode mtime and submitted time. Note that ISO_FIND_COND_GREATER, for example, is true if the node time is greater than the submitted time. |
Definition at line 570 of file find.c.
References cond_times::comparison, cond_time_free(), cond_time_matches(), iso_find_condition::data, iso_find_condition::free, iso_find_condition::matches, cond_times::time, and cond_times::what_time.
IsoFindCondition* iso_new_find_conditions_name | ( | const char * | wildcard | ) |
Create a new condition that checks if the node name matches the given wildcard.
wildcard |
Definition at line 318 of file find.c.
References find_iter_data::cond, cond_name_free(), cond_name_matches(), iso_find_condition::data, iso_find_condition::free, and iso_find_condition::matches.
IsoFindCondition* iso_new_find_conditions_not | ( | IsoFindCondition * | negate | ) |
Create a new condition that check if the given conditions is false.
negate |
Definition at line 755 of file find.c.
References cond_not_free(), cond_not_matches(), iso_find_condition::data, iso_find_condition::free, and iso_find_condition::matches.
IsoFindCondition* iso_new_find_conditions_or | ( | IsoFindCondition * | a, |
IsoFindCondition * | b | ||
) |
Create a new condition that check if at least one the two given conditions is valid.
a | |
b | IsoFindCondition to compare |
Definition at line 709 of file find.c.
References logical_binary_conditions::a, logical_binary_conditions::b, cond_logical_binary_free(), cond_logical_or_matches(), iso_find_condition::data, iso_find_condition::free, and iso_find_condition::matches.
IsoFindCondition* iso_new_find_conditions_uid | ( | uid_t | uid | ) |
Create a new condition that checks the node uid.
uid | Desired User Id. |
Definition at line 456 of file find.c.
References find_iter_data::cond, cond_uid_free(), cond_uid_matches(), iso_find_condition::data, iso_find_condition::free, and iso_find_condition::matches.
|
static |
Definition at line 99 of file find.c.
References find_iter_data::cond, find_iter_data::current, Iso_Dir_Iter::data, find_iter_data::dir, Iso_Dir_Iter::dir, find_iter_data::err, find_iter_data::free_cond, get_next(), iso_dir_find_children(), ISO_NODE_IS_DIR, iso_node_ref(), iso_node_unref(), find_iter_data::iter, find_iter_data::itersec, Iso_Node::parent, and find_iter_data::prev.
Referenced by find_iter_next(), and iso_dir_find_children().
|
static |
Definition at line 213 of file find.c.
Referenced by iso_dir_find_children().