clsync
Functions
rules.c File Reference
#include "common.h"
#include <glib.h>
#include "rules.h"
#include "error.h"
Include dependency graph for rules.c:

Go to the source code of this file.

Functions

int rule_complete (rule_t *rule_p, char *expr, size_t *rules_count_p)
 
int parse_rules_fromfile (ctx_t *ctx_p)
 
ruleaction_t rules_search_getperm (const char *fpath, mode_t st_mode, rule_t *rules_p, const ruleaction_t ruleaction, rule_t **rule_pp)
 Checks file path by rules' expressions (parsed from file) More...
 
ruleaction_t rules_getperm (const char *fpath, mode_t st_mode, rule_t *rules_p, ruleaction_t ruleactions)
 

Function Documentation

◆ parse_rules_fromfile()

int parse_rules_fromfile ( ctx_t ctx_p)

Definition at line 56 of file rules.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rule_complete()

int rule_complete ( rule_t rule_p,
char *  expr,
size_t *  rules_count_p 
)

Definition at line 27 of file rules.c.

Here is the caller graph for this function:

◆ rules_getperm()

ruleaction_t rules_getperm ( const char *  fpath,
mode_t  st_mode,
rule_t rules_p,
ruleaction_t  ruleactions 
)

Definition at line 403 of file rules.c.

Here is the call graph for this function:

◆ rules_search_getperm()

ruleaction_t rules_search_getperm ( const char *  fpath,
mode_t  st_mode,
rule_t rules_p,
const ruleaction_t  ruleaction,
rule_t **  rule_pp 
)

Checks file path by rules' expressions (parsed from file)

Parameters
[in]fpathPath to file of directory
[in]st_modest_mode received via *stat() functions
[in]rules_pPointer to start of rules array
[in]ruleactionOperaton ID (see ruleaction_t)
[in,out]rule_ppPointer to pointer to rule, where the last search ended. Next search will be started from the specified rule. Can be "NULL" to disable this feature.
Return values
permPermission bitmask

Definition at line 327 of file rules.c.

Here is the caller graph for this function: