fsautoproc
Basic file transformation automation management utility
Loading...
Searching...
No Matches
deng.h
Go to the documentation of this file.
1
3#ifndef FSAUTOPROC_DENG_H
4#define FSAUTOPROC_DENG_H
5
6#include <signal.h>
7#include <stdbool.h>
8
9struct inode_s;
10struct index_s;
11
18
26
30 void (*notify)(enum deng_notif_t notif);
31 void (*event)(enum deng_fevent_t event, struct inode_s* in);
32};
33
38typedef bool (*deng_filter_t)(const char* fp);
39
43 const char* sd;
45 const struct deng_hooks_s* hooks;
46 const struct index_s* old;
47 struct index_s* new;
48};
49
58int dengsearch(const struct deng_params_s* p,
59 const volatile sig_atomic_t* stop);
60
61#endif//FSAUTOPROC_DENG_H
deng_fevent_t
File change event types for the file comparison process.
Definition deng.h:21
@ DENG_FEVENT_NEW
New file event.
Definition deng.h:22
@ DENG_FEVENT_DEL
Deleted file event.
Definition deng.h:23
@ DENG_FEVENT_MOD
Modified file event.
Definition deng.h:24
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....
Definition deng.c:179
deng_notif_t
Notification events for the file search process.
Definition deng.h:14
@ DENG_NOTIF_FILE_FOUND
Occurs when a file will be processed.
Definition deng.h:15
@ DENG_NOTIF_STAGE_DONE
Occurs when a stage has been fully processed.
Definition deng.h:16
bool(* deng_filter_t)(const char *fp)
Filter function for ignoring files during the search process.
Definition deng.h:38
Hook functions for file system search events.
Definition deng.h:29
void(* event)(enum deng_fevent_t event, struct inode_s *in)
File event.
Definition deng.h:31
void(* notify)(enum deng_notif_t notif)
Progress notification event.
Definition deng.h:30
Parameters for the differential file search process.
Definition deng.h:42
const char * sd
Search directory root.
Definition deng.h:43
const struct deng_hooks_s * hooks
File event hook functions.
Definition deng.h:45
const struct index_s * old
Previous index state.
Definition deng.h:46
deng_filter_t filter
File filter function.
Definition deng.h:44
Index map structure for storing file nodes.
Definition index.h:42
Individual file node in the index map.
Definition index.h:13
char * fp
File path (string duplicated)
Definition index.h:14