Commit Graph

1 Commits (42fd81138d21c5e613d1c51dbd379f038bba42a6)

Author SHA1 Message Date
Vincent Reher 42fd81138d Encapsulate hidden file detection into a class that can be used to generalize
and replace hard-coded "dotfile" detection. This starts to address issue # 273.

Hidden files can be identified using one or more match strings, with matching
governed either by wildcard (default) or regexp (optional). Matching is either
case-sensitive (default) or case-INsensitive (optional). A user interface for
inspecting and modifying match criteria is provided.

Match criteria is passed from/to applications or views as TQString that starts
with a single character:
  'w' - match strings are wildcards, match is case-sensitive
  'W' - match strings are wildcards, match is case-INsensitive
  'r' - match strings are regexps, match is case-sensitive
  'R' - match strings are regexps, match is case-INsensitive
The remainder of the string is a '/'-separated list of one or more match strings.

The TDEHiddenFileMatcher class is derived from a more general TDEStringMatcher
class which is available to applications to conduct other string matching tasks.

Signed-off-by: Vincent Reher <tde@4reher.org>
3 years ago