Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions content/reference/promise-types/files/_index.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,16 @@ regular expression that matches any single-character filename, use
Depth search refers to a search for file objects that starts from the
one or more matched base-paths as shown in the example above.

### When is a promiser treated as a regular expression?

CFEngine treats a files promiser as a regular expression if:

- `pathtype => "regex"` is explicitly set.
- `pathtype => "guess"` (the default) is set **and** the promiser contains any of the following:
- `*` or `+` (unescaped)
- `[...]` (character classes)
- `|` inside parentheses `(...)`

### Filenames and regular expressions

CFEngine allows regular expressions within filenames, but only after
Expand Down
Loading