From 8f358de9930a5919f875eca33b5ecd6cb55b700e Mon Sep 17 00:00:00 2001 From: Nick Anderson Date: Fri, 16 Aug 2024 13:39:15 -0500 Subject: [PATCH] Clarified that ./ is not specific to explicit create attribute Ticket: ENT-12118 Changelog: None (cherry picked from commit deb98709cf22af8ccd6b6f5534870ee3a6e66690) --- reference/promise-types/files.markdown | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/reference/promise-types/files.markdown b/reference/promise-types/files.markdown index a412bf2ff..632baa811 100644 --- a/reference/promise-types/files.markdown +++ b/reference/promise-types/files.markdown @@ -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.