Excluding/ignoring folders and files (auto-globbing) reference
IntegrityChecker Java (icj) offers a file globbing mechanism for excluding folders and files from its operations. For an introduction to file globbing, see the following, but note that icj incorporates a user-friendly feature called auto-globbing, described below.
TIP: after adding or changing file globbing patterns, verify which folders and files are being ignored on all folders/volumes, lest too liberal a pattern match items not intended for exclusion. For example:
# display status for current directory, version 2.0
icj status --matches=all
# display status on folder or volume Photos, version 2.0
icj status --matches=all Photos
# display globbing matches for current directory, version 3.0
icj matches
# display globbing matches on folders for volume Photos, version 3.0
icj matches --kind=folders Photos
Auto globbing
Auto-globbing is a user-friendly feature that makes it possible to configure a folder or partial path match without having to understand globbing syntax.
Auto-globbing applies only to folders, not to file names or file paths. See each preference section for whether auto-globbing is supported.
Atuo-globbing works by inserting an appropriate pattern as a prefix and/or suffix to the expression, as well as generating the required two expressions needed to exclude a folder and all its subfolders.
See the auto-globbing examples page for examples.
Auto-globbing rules:
- Auto-globbing will prepend **/ for any expression not starting with / or **.
- Auto-globbing will suffix ** or /** as appropriate for any expression not ending with ** (as well as the original form, two patterns in total)
- To match a folder/path itself and all subfolders, auto-globbing will create two globs for any expression not ending with **. This is necessary so that both the folder and all subfolders are matched.
- "glob:" is prepended automatically as needed.
- File names and paths do not support auto-globbing — only folders.
Additional notes
These rules apply to filenames.ignore as well.
- A leading ~ character means "user home directory" and substitutes the appropriate path but ALSO with a leading "**", eg for user "lloyd", "~" becomes "**/Users/lloyd" on macOS systems. This is done so that user home dir paths within backups will still match.
- Leading or trailing white space is significant as part of the pattern; beware of trailing spaces in particular. This is necessary because names can contain spaces.
- Auto-globbing for folders: expression prefixed with / or ** is not subject to auto-globbing on the prefix portion.
- Auto-globbing for folders: an expression ending with ** is not subject to auto-globbing on the suffix portion.
- To disable auto-globbing on a pattern, prefix the expression with "glob:" for full glob syntax or "regex:" for java regex syntax.
Copyright © 2022 diglloyd Inc, all rights reserved