typedef struct FileDirRule FileDirRule;
typedef struct FileDirRuleOperations
{
bool (*contains_file)(FileDirRule *rule, char *path);
bool (*contains_dir)(FileDirRule *rule, char *path);
} FileDirRuleOperations;
struct FileDirRule
{
Rule;
FileDirRuleOperations *fdops;
};
bool filedirrule_contains(Rule *rule, char *path, int omode, ulong perm);
/** generic contains function that always return true */
bool filedirrule_contains_true(FileDirRule *, char *);
/** generic contains function that always return false */
bool filedirrule_contains_false(FileDirRule *, char *);
bool filedirrule_file_issatisfy(Rule *self, char *path, Dir *d);
bool filedirrule_dir_issatisfy(Rule *self, char *path, Dir *d);
bool filedirrule_file_dir_issatisfy(Rule *self, char *path, Dir *d);
|