Skip to content

Commit

Permalink
Clarified that ./ is not specific to explicit create attribute
Browse files Browse the repository at this point in the history
Ticket: ENT-12118
Changelog: None
  • Loading branch information
nickanderson committed Aug 16, 2024
1 parent 2d20db4 commit deb9870
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions reference/promise-types/files.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,13 @@ When doing a recursive search, the files '.' and '..' are never
included in the matched files, even if the regular expression in the
`leaf_name` specifically allows them.

The filename `/dir/ect/ory/.` is a special case used with the `create`
attribute to indicate the directory named `/dir/ect/ory` and not any of
the files under it. If you really want to specify a regular expression
that matches any single-character filename, use `/dir/ect/ory/[\w\W]` as
your promise regular expression (you can't use `/dir/ect/ory/[^/]`, see
below for an explanation.
The filename `/dir/ect/ory/.` is a special case to avoid ambiguity between files
and directories, especially in the case of creation (both with and without the
explicit `create` attribute). Using /. ensures that a regular file is not
created when a directory is actually desired. If you really want to specify a
regular expression that matches any single-character filename, use
`/dir/ect/ory/[\w\W]` as your promise regular expression (you can't use
`/dir/ect/ory/[^/]`, see below for an explanation.

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.
Expand Down

0 comments on commit deb9870

Please sign in to comment.