Differential file search comparison function and hook structure.
More...
#include <signal.h>
#include <stdbool.h>
Go to the source code of this file.
|
| typedef bool(* | deng_filter_t) (const char *fp) |
| | Filter function for ignoring files during the search process.
|
| |
|
| int | dengsearch (const struct deng_params_s *p, const volatile sig_atomic_t *stop) |
| | 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.
|
| |
Differential file search comparison function and hook structure.
◆ deng_filter_t
Filter function for ignoring files during the search process.
- Parameters
-
| fp | The file path to filter |
- Returns
- true if the file should be ignored, otherwise false
◆ deng_fevent_t
File change event types for the file comparison process.
| Enumerator |
|---|
| DENG_FEVENT_NEW | New file event.
|
| DENG_FEVENT_DEL | Deleted file event.
|
| DENG_FEVENT_MOD | Modified file event.
|
◆ deng_notif_t
Notification events for the file search process.
| Enumerator |
|---|
| DENG_NOTIF_FILE_FOUND | Occurs when a file will be processed.
|
| DENG_NOTIF_STAGE_DONE | Occurs when a stage has been fully processed.
|
◆ dengsearch()
| int dengsearch |
( |
const struct deng_params_s * |
p, |
|
|
const volatile sig_atomic_t * |
stop |
|
) |
| |
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
-
| p | The differential search parameters |
| stop | An atomic integer which can be set to a non-zero value to interrupt the search process (can be NULL to ignore) |
- Returns
- 0 if successful, otherwise a non-zero error code.