fsautoproc
Basic file transformation automation management utility
Loading...
Searching...
No Matches
deng.h File Reference

Differential file search comparison function and hook structure. More...

#include <stdbool.h>
Include dependency graph for deng.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  deng_hooks_s
 Hook functions for file system search events. More...
 

Typedefs

typedef bool(* deng_filter_t) (const char *fp)
 Filter function for ignoring files during the search process.
 

Enumerations

enum  deng_notif_t { DENG_NOTIF_DIR_DONE , DENG_NOTIF_STAGE_DONE }
 Notification events for the file search process. More...
 

Functions

int dengsearch (const char *sd, deng_filter_t filter, const struct deng_hooks_s *hooks, const struct index_s *old, struct index_s *new)
 Recursively scans directory sd and compares the file system state with a previously saved index. Any new, modified, deleted, or unmodified files are reported to the caller via the provided hooks structure, hooks. The index state new is then updated with the current file system state.
 

Detailed Description

Differential file search comparison function and hook structure.

Typedef Documentation

◆ deng_filter_t

typedef bool(* deng_filter_t) (const char *fp)

Filter function for ignoring files during the search process.

Parameters
fpThe file path to filter
Returns
true if the file should be ignored, otherwise false

Enumeration Type Documentation

◆ deng_notif_t

Notification events for the file search process.

Enumerator
DENG_NOTIF_DIR_DONE 

Occurs when a directory has been fully processed.

DENG_NOTIF_STAGE_DONE 

Occurs when a stage has been fully processed.

Function Documentation

◆ dengsearch()

int dengsearch ( const char * sd,
deng_filter_t filter,
const struct deng_hooks_s * hooks,
const struct index_s * old,
struct index_s * new )

Recursively scans directory sd and compares the file system state with a previously saved index. Any new, modified, deleted, or unmodified files are reported to the caller via the provided hooks structure, hooks. The index state new is then updated with the current file system state.

Parameters
sdThe directory to scan for conditionally ignoring files
filterThe file filter function
hooksThe file event hook functions
oldThe previous index state
newThe current index state
Returns
0 if successful, otherwise a non-zero error code.
Here is the call graph for this function:
Here is the caller graph for this function: