MCPcopy Create free account
hub / github.com/RsyncProject/rsync / name_is_excluded

Function name_is_excluded

exclude.c:1010–1025  ·  view source on GitHub ↗

This function is used to check if a file should be included/excluded * from the list of files based on its name and type etc. The value of * filter_level is set to either SERVER_FILTERS or ALL_FILTERS. */

Source from the content-addressed store, hash-verified

1008 * from the list of files based on its name and type etc. The value of
1009 * filter_level is set to either SERVER_FILTERS or ALL_FILTERS. */
1010int name_is_excluded(const char *fname, int name_flags, int filter_level)
1011{
1012 if (daemon_filter_list.head && check_filter(&daemon_filter_list, FLOG, fname, name_flags) < 0) {
1013 if (!(name_flags & NAME_IS_XATTR))
1014 errno = ENOENT;
1015 return 1;
1016 }
1017
1018 if (filter_level != ALL_FILTERS)
1019 return 0;
1020
1021 if (filter_list.head && check_filter(&filter_list, FINFO, fname, name_flags) < 0)
1022 return 1;
1023
1024 return 0;
1025}
1026
1027int check_server_filter(filter_rule_list *listp, enum logcode code, const char *name, int name_flags)
1028{

Callers 5

is_excludedFunction · 0.85
rsync_xal_getFunction · 0.85
copy_xattrsFunction · 0.85
receive_xattrFunction · 0.85
rsync_xal_setFunction · 0.85

Calls 1

check_filterFunction · 0.70

Tested by

no test coverage detected