When multiple <file> tags are specified in ctree.conf, a file name may match more than one tag. The following file precedence rules determine which one is actually applied:
In case a file matches multiple <file> rules: |
A <file> rule with higher priority takes precedence over one with lower priority. |
In case of matching priorities: |
A specific type matching rule (i.e., I, R, L, or S) takes precedence over the * (unspecified) type. |
In case of multiple rules with the same type: |
An exact match takes precedence over any wildcard match. For example, file name "custmast" matches <file name="custmast"> before matching <file name="cust*">. A wildcard match has precedence over an unspecified match. For example, file name "custmast" matches <file name="cust*"> before matching <file> or <file name="*">. Please notice that specifying <file name="*"> is equivalent to not specifying <file name> at all. |
In case of multiple wildcard matches: |
The rule with the most matching characters takes precedence: For example, file name "custmast" matches <file name="cust*"> before it matches <file name="*ast">. |
In case both name and dir are specified: |
The sum of the matching characters of both name and dir setting is considered. |
In case the sum of matching characters is equal: |
The rule with the longest matching characters takes precedence: For example, file name "custmast" matches <file name="cust*" dir="data"> before it matches <file name="*mast" dir= ".">. |
In case the lengths of the settings are equal |
Alphabetical order is used: For example, file name "custmast" matches <file name="cust*" dir="."> before matching <file name="*mast" dir= ".">. |