diff --git a/xml/System.IO/Directory.xml b/xml/System.IO/Directory.xml
index 16bf1c36fff..47b9078eccf 100644
--- a/xml/System.IO/Directory.xml
+++ b/xml/System.IO/Directory.xml
@@ -222,7 +222,7 @@ Directory::CreateDirectory("Public\\Html");
is prefixed with, or contains, only a colon character (:).
is .
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
The specified path is invalid (for example, it is on an unmapped drive).
contains a colon character (:) that is not part of a drive label ("C:\\").
@@ -307,7 +307,7 @@ Directory::CreateDirectory("Public\\Html");
is prefixed with, or contains, only a colon character (:).
is .
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
The specified path is invalid (for example, it is on an unmapped drive).
contains a colon character (:) that is not part of a drive label ("C:\\").
@@ -413,7 +413,7 @@ Directory::CreateDirectory("Public\\Html");
is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method.
is .
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
does not exist or could not be found.
@@ -518,7 +518,7 @@ Directory::CreateDirectory("Public\\Html");
is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method.
is .
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
does not exist or could not be found.
@@ -604,7 +604,7 @@ Directory::CreateDirectory("Public\\Html");
is invalid, such as referring to an unmapped drive.
is a file name.
- The specified path, file name, or combined exceed the system-defined maximum length.
+ The specified path, file name, or combined exceed the system-defined maximum length.
The caller does not have the required permission.
The caller does not have the required permission.
@@ -680,7 +680,7 @@ Directory::CreateDirectory("Public\\Html");
is a zero-length string, contains only white space, or contains invalid characters. You can query for invalid characters with the method.
--or-
+ -or-
does not contain a valid pattern.
@@ -693,7 +693,7 @@ Directory::CreateDirectory("Public\\Html");
is invalid, such as referring to an unmapped drive.
is a file name.
- The specified path, file name, or combined exceed the system-defined maximum length.
+ The specified path, file name, or combined exceed the system-defined maximum length.
The caller does not have the required permission.
The caller does not have the required permission.
@@ -725,12 +725,51 @@ Directory::CreateDirectory("Public\\Html");
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ The relative or absolute path to the directory to search. This string is not case-sensitive.
+ The search string to match against the names of directories in . This parameter can contain a combination of valid literal path and wildcard (* and ?) characters, but it doesn't support regular expressions.
+ An object that describes the search and enumeration configuration to use.
+ Returns an enumerable collection of the directory full names that match a search pattern in a specified path, and optionally searches subdirectories.
+ An enumerable collection of the full names (including paths) for the directories in the directory specified by and that match the specified search pattern and enumeration options.
+
+ or , nor can it contain any invalid characters. You can query for invalid characters by using the method.
+
+ You can specify relative or absolute path information in the `path` parameter. Relative path information is interpreted as relative to the current working directory, which you can determine by using the method. The returned directory names are prefixed with the value you provided in the `path` parameter. For example, if you provide a relative path in the `path` parameter, the returned directory names will contain a relative path.
+
+ The and methods differ as follows: When you use , you can start enumerating the collection of names before the whole collection is returned; when you use , you must wait for the whole array of names to be returned before you can access the array. Therefore, when you are working with many files and directories, can be more efficient.
+
+ The returned collection is not cached; each call to the on the collection will start a new enumeration.
+
+ ]]>
+
+
+ is a zero-length string, contains only white space, or contains invalid characters. You can query for invalid characters by using the method.
+
+ -or-
+
+ does not contain a valid pattern.
+
+ or is .
+
+ is not a valid value.
+
+ is invalid, such as referring to an unmapped drive.
+
+ is a file name.
+ The specified path, file name, or combined exceed the system-defined maximum length.
+ The caller does not have the required permission.
+ The caller does not have the required permission.
@@ -768,11 +807,9 @@ Directory::CreateDirectory("Public\\Html");
The relative or absolute path to the directory to search. This string is not case-sensitive.
The search string to match against the names of directories in . This parameter can contain a combination of valid literal path and wildcard (* and ?) characters, but it doesn't support regular expressions.
- One of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories.
-
- The default value is .
+ One of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories. The default value is .
Returns an enumerable collection of directory full names that match a search pattern in a specified path, and optionally searches subdirectories.
- An enumerable collection of the full names (including paths) for the directories in the directory specified by and that match the specified search pattern and option.
+ An enumerable collection of the full names (including paths) for the directories in the directory specified by and that match the specified search pattern and search option.
is a zero-length string, contains only white space, or contains invalid characters. You can query for invalid characters by using the method.
--or-
+ -or-
does not contain a valid pattern.
@@ -822,7 +859,7 @@ Directory::CreateDirectory("Public\\Html");
is invalid, such as referring to an unmapped drive.
is a file name.
- The specified path, file name, or combined exceed the system-defined maximum length.
+ The specified path, file name, or combined exceed the system-defined maximum length.
The caller does not have the required permission.
The caller does not have the required permission.
@@ -905,7 +942,7 @@ Directory::CreateDirectory("Public\\Html");
is invalid, such as referring to an unmapped drive.
is a file name.
- The specified path, file name, or combined exceed the system-defined maximum length.
+ The specified path, file name, or combined exceed the system-defined maximum length.
The caller does not have the required permission.
The caller does not have the required permission.
@@ -994,7 +1031,7 @@ Directory::CreateDirectory("Public\\Html");
is a zero-length string, contains only white space, or contains invalid characters. You can query for invalid characters by using the method.
--or-
+ -or-
does not contain a valid pattern.
@@ -1007,7 +1044,7 @@ Directory::CreateDirectory("Public\\Html");
is invalid, such as referring to an unmapped drive.
is a file name.
- The specified path, file name, or combined exceed the system-defined maximum length.
+ The specified path, file name, or combined exceed the system-defined maximum length.
The caller does not have the required permission.
The caller does not have the required permission.
@@ -1039,12 +1076,62 @@ Directory::CreateDirectory("Public\\Html");
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ The relative or absolute path to the directory to search. This string is not case-sensitive.
+ The search string to match against the names of files in . This parameter can contain a combination of valid literal path and wildcard (* and ?) characters, but it doesn't support regular expressions.
+ An object that describes the search and enumeration configuration to use.
+ Returns an enumerable collection of full file names that match a search pattern and enumeration options in a specified path, and optionally searches subdirectories.
+ An enumerable collection of the full names (including paths) for the files in the directory specified by and that match the specified search pattern and enumeration options.
+
+ [!NOTE]
+> When you use the asterisk wildcard character in a `searchPattern` such as "\*.txt", the number of characters in the specified extension affects the search as follows:
+>
+> - If the specified extension is exactly three characters long, the method returns files with extensions that begin with the specified extension. For example, "\*.xls" returns both "book.xls" and "book.xlsx".
+> - In all other cases, the method returns files that exactly match the specified extension. For example, "\*.ai" returns "file.ai" but not "file.aif".
+>
+> When you use the question mark wildcard character, this method returns only files that match the specified file extension. For example, given two files, "file1.txt" and "file1.txtother", in a directory, a search pattern of "file?.txt" returns just the first file, whereas a search pattern of "file\*.txt" returns both files.
+
+ `searchPattern` cannot end in two periods ("..") or contain two periods ("..") followed by or , nor can it contain any invalid characters. You can query for invalid characters by using the method.
+
+ You can specify relative path information with the `path` parameter. Relative path information is interpreted as relative to the current working directory, which you can determine by using the method.
+
+ The and methods differ as follows: When you use , you can start enumerating the collection of names before the whole collection is returned; when you use , you must wait for the whole array of names to be returned before you can access the array. Therefore, when you are working with many files and directories, can be more efficient.
+
+ The returned collection is not cached; each call to the on the collection will start a new enumeration.
+
+ ]]>
+
+
+ is a zero-length string, contains only white space, or contains invalid characters. You can query for invalid characters by using the method.
+
+ -or-
+
+ does not contain a valid pattern.
+
+ is .
+
+ -or-
+
+ is .
+
+ is not a valid value.
+
+ is invalid, such as referring to an unmapped drive.
+
+ is a file name.
+ The specified path, file name, or combined exceed the system-defined maximum length.
+ The caller does not have the required permission.
@@ -1082,11 +1169,9 @@ Directory::CreateDirectory("Public\\Html");
The relative or absolute path to the directory to search. This string is not case-sensitive.
The search string to match against the names of files in . This parameter can contain a combination of valid literal path and wildcard (* and ?) characters, but it doesn't support regular expressions.
- One of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories.
-
- The default value is .
+ One of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories. The default value is .
Returns an enumerable collection of full file names that match a search pattern in a specified path, and optionally searches subdirectories.
- An enumerable collection of the full names (including paths) for the files in the directory specified by and that match the specified search pattern and option.
+ An enumerable collection of the full names (including paths) for the files in the directory specified by and that match the specified search pattern and search option.
is a zero-length string, contains only white space, or contains invalid characters. You can query for invalid characters by using the method.
--or-
+ -or-
does not contain a valid pattern.
@@ -1149,7 +1234,7 @@ Directory::CreateDirectory("Public\\Html");
is invalid, such as referring to an unmapped drive.
is a file name.
- The specified path, file name, or combined exceed the system-defined maximum length.
+ The specified path, file name, or combined exceed the system-defined maximum length.
The caller does not have the required permission.
The caller does not have the required permission.
@@ -1203,11 +1288,11 @@ Directory::CreateDirectory("Public\\Html");
method.
-
- The and methods differ as follows: When you use , you can start enumerating the collection of entries before the whole collection is returned; when you use , you must wait for the whole array of entries to be returned before you can access the array. Therefore, when you are working with many files and directories, can be more efficient.
-
- The returned collection is not cached; each call to the on the collection will start a new enumeration.
+ You can specify relative path information with the `path` parameter. Relative path information is interpreted as relative to the current working directory, which you can determine by using the method.
+
+ The and methods differ as follows: When you use , you can start enumerating the collection of entries before the whole collection is returned; when you use , you must wait for the whole array of entries to be returned before you can access the array. Therefore, when you are working with many files and directories, can be more efficient.
+
+ The returned collection is not cached; each call to the on the collection will start a new enumeration.
]]>
@@ -1219,7 +1304,7 @@ Directory::CreateDirectory("Public\\Html");
is invalid, such as referring to an unmapped drive.
is a file name.
- The specified path, file name, or combined exceed the system-defined maximum length.
+ The specified path, file name, or combined exceed the system-defined maximum length.
The caller does not have the required permission.
The caller does not have the required permission.
@@ -1259,7 +1344,7 @@ Directory::CreateDirectory("Public\\Html");
The relative or absolute path to the directory to search. This string is not case-sensitive.
The search string to match against the names of file-system entries in . This parameter can contain a combination of valid literal path and wildcard (* and ?) characters, but it doesn't support regular expressions.
- Returns an enumerable collection of file names and directory names that match a search pattern in a specified path.
+ Returns an enumerable collection of file names and directory names that match a search pattern in a specified path.
An enumerable collection of file-system entries in the directory specified by and that match the specified search pattern.
is a zero-length string, contains only white space, or contains invalid characters. You can query for invalid characters by using the method.
--or-
+ -or-
does not contain a valid pattern.
@@ -1308,7 +1393,7 @@ Directory::CreateDirectory("Public\\Html");
is invalid, such as referring to an unmapped drive.
is a file name.
- The specified path, file name, or combined exceed the system-defined maximum length.
+ The specified path, file name, or combined exceed the system-defined maximum length.
The caller does not have the required permission.
The caller does not have the required permission.
@@ -1340,12 +1425,63 @@ Directory::CreateDirectory("Public\\Html");
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ The relative or absolute path to the directory to search. This string is not case-sensitive.
+ The search string to match against the names of subdirectories in . This parameter can contain a combination of valid literal and wildcard characters, but it doesn't support regular expressions.
+ An object that describes the search and enumeration configuration to use.
+ Returns an enumerable collection of file names and directory names that match a search pattern and enumeration options in a specified path.
+ An enumerable collection of file-system entries in the directory specified by , that match the specified search pattern and the specified enumeration options.
+
+ [!NOTE]
+> When you use the asterisk wildcard character in a `searchPattern` such as "\*.txt", the number of characters in the specified extension affects the search as follows:
+>
+> - If the specified extension is exactly three characters long, the method returns files with extensions that begin with the specified extension. For example, "\*.xls" returns both "book.xls" and "book.xlsx".
+> - In all other cases, the method returns files that exactly match the specified extension. For example, "\*.ai" returns "file.ai" but not "file.aif".
+>
+> When you use the question mark wildcard character, this method returns only files that match the specified file extension. For example, given two files, "file1.txt" and "file1.txtother", in a directory, a search pattern of "file?.txt" returns just the first file, whereas a search pattern of "file\*.txt" returns both files.
+
+ `searchPattern` cannot end in two periods ("..") or contain two periods ("..") followed by or , nor can it contain any invalid characters. You can query for invalid characters by using the method.
+
+ You can specify relative path information with the `path` parameter. Relative path information is interpreted as relative to the current working directory, which you can determine by using the method.
+
+ The and methods differ as follows: When you use , you can start enumerating the collection of entries before the whole collection is returned; when you use , you must wait for the whole array of entries to be returned before you can access the array. Therefore, when you are working with many files and directories, can be more efficient.
+
+ The returned collection is not cached; each call to the on the collection will start a new enumeration.
+
+ ]]>
+
+
+ is a zero-length string, contains only white space, or contains invalid characters. You can query for invalid characters by using the method.
+
+ -or-
+
+ does not contain a valid pattern.
+
+ is .
+
+ -or-
+
+ is .
+
+ is not a valid value.
+
+ is invalid, such as referring to an unmapped drive.
+
+ is a file name.
+ The specified path, file name, or combined exceed the system-defined maximum length.
+ The caller does not have the required permission.
+ The caller does not have the required permission.
@@ -1383,9 +1519,7 @@ Directory::CreateDirectory("Public\\Html");
The relative or absolute path to the directory to search. This string is not case-sensitive.
The search string to match against file-system entries in . This parameter can contain a combination of valid literal path and wildcard (* and ?) characters, but it doesn't support regular expressions.
- One of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories.
-
- The default value is .
+ One of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories. The default value is .
Returns an enumerable collection of file names and directory names that match a search pattern in a specified path, and optionally searches subdirectories.
An enumerable collection of file-system entries in the directory specified by and that match the specified search pattern and option.
@@ -1422,7 +1556,7 @@ Directory::CreateDirectory("Public\\Html");
is a zero-length string, contains only white space, or contains invalid characters. You can query for invalid characters by using the method.
--or-
+ -or-
does not contain a valid pattern.
@@ -1437,7 +1571,7 @@ Directory::CreateDirectory("Public\\Html");
is invalid, such as referring to an unmapped drive.
is a file name.
- The specified path, file name, or combined exceed the system-defined maximum length.
+ The specified path, file name, or combined exceed the system-defined maximum length.
The caller does not have the required permission.
The caller does not have the required permission.
@@ -1734,7 +1868,7 @@ Directory::CreateDirectory("Public\\Html");
is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method.
is .
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
for reading the specified file or directory. Associated enumeration:
File and Stream I/O
@@ -1812,7 +1946,7 @@ Directory::CreateDirectory("Public\\Html");
is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method.
is .
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
for reading the specified file or directory. Associated enumeration:
File and Stream I/O
@@ -1967,7 +2101,7 @@ Directory::CreateDirectory("Public\\Html");
is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method.
is .
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
is a file name.
The specified path is invalid (for example, it is on an unmapped drive).
@@ -2060,7 +2194,7 @@ Directory::CreateDirectory("Public\\Html");
doesn't contain a valid pattern.
or is .
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
is a file name.
The specified path is invalid (for example, it is on an unmapped drive).
@@ -2098,12 +2232,49 @@ Directory::CreateDirectory("Public\\Html");
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ The relative or absolute path to the directory to search. This string is not case-sensitive.
+ The search string to match against the names of subdirectories in . This parameter can contain a combination of valid literal and wildcard characters, but it doesn't support regular expressions.
+ An object that describes the search and enumeration configuration to use.
+ Returns the names of subdirectories (including their paths) that match the specified search pattern and enumeration options in the specified directory.
+ An array of the full names (including paths) of the subdirectories that match the search pattern and enumeration options in the specified directory, or an empty array if no directories are found.
+
+ method and specify in the `searchOption` parameter.
+
+ `searchPattern` can be a combination of literal and wildcard characters, but it doesn't support regular expressions. The following wildcard specifiers are permitted in `searchPattern`.
+
+|Wildcard specifier|Matches|
+|------------------------|-------------|
+|\* (asterisk)|Zero or more characters in that position.|
+|? (question mark)|Zero or one character in that position.|
+
+ Characters other than the wildcard are literal characters. For example, the `searchPattern` string "\*t" searches for all names in `path` ending with the letter "t". The `searchPattern` string "s\*" searches for all names in `path` beginning with the letter "s".
+
+ `searchPattern` cannot end in two periods ("..") or contain two periods ("..") followed by or , nor can it contain any invalid characters. You can query for invalid characters by using the method.
+
+ The `path` parameter can specify relative or absolute path information, and is not case-sensitive. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see .
+
+ The and methods differ as follows: When you use , you can start enumerating the collection of names before the whole collection is returned; when you use , you must wait for the whole array of names to be returned before you can access the array. Therefore, when you are working with many files and directories, can be more efficient.
+
+ For a list of common I/O tasks, see [Common I/O Tasks](~/docs/standard/io/common-i-o-tasks.md).
+
+ ]]>
+
+ The caller does not have the required permission.
+
+ is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using .
+
+ -or-
+
+ doesn't contain a valid pattern.
+
+ or is .
+ The specified path, file name, or both exceed the system-defined maximum length.
+
+ is a file name.
+ The specified path is invalid (for example, it is on an unmapped drive).
@@ -2187,7 +2358,7 @@ Directory::CreateDirectory("Public\\Html");
is not a valid value.
The caller does not have the required permission.
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
is a file name.
The specified path is invalid (for example, it is on an unmapped drive).
@@ -2268,7 +2439,7 @@ Directory::CreateDirectory("Public\\Html");
is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with .
is .
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
for access to path information for the current directory. Associated enumeration:
File and Stream I/O
How to: Read Text from a File
@@ -2362,7 +2533,7 @@ Directory::CreateDirectory("Public\\Html");
is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method.
is .
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
The specified path is not found or is invalid (for example, it is on an unmapped drive).
for access to path information for the current directory. Associated enumeration:
File and Stream I/O
@@ -2471,7 +2642,7 @@ Directory::CreateDirectory("Public\\Html");
doesn't contain a valid pattern.
or is .
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
The specified path is not found or is invalid (for example, it is on an unmapped drive).
for access to path information for the current directory. Associated enumeration:
File and Stream I/O
@@ -2506,12 +2677,66 @@ Directory::CreateDirectory("Public\\Html");
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ The relative or absolute path to the directory to search. This string is not case-sensitive.
+ The search string to match against the names of subdirectories in . This parameter can contain a combination of valid literal and wildcard characters, but it doesn't support regular expressions.
+ An object that describes the search and enumeration configuration to use.
+ Returns the names of files (including their paths) that match the specified search pattern and enumeration options in the specified directory.
+ An array of the full names (including paths) for the files in the specified directory that match the specified search pattern and enumeration options, or an empty array if no files are found.
+
+ method if a specific sort order is required.
+
+ `searchPattern` can be a combination of literal and wildcard characters, but it doesn't support regular expressions. The following wildcard specifiers are permitted in `searchPattern`.
+
+|Wildcard specifier|Matches|
+|------------------------|-------------|
+|\* (asterisk)|Zero or more characters in that position.|
+|? (question mark)|Zero or one character in that position.|
+
+ Characters other than the wildcard are literal characters. For example, the `searchPattern` string "\*t" searches for all names in `path` ending with the letter "t". The `searchPattern` string "s\*" searches for all names in `path` beginning with the letter "s".
+
+ `searchPattern` cannot end in two periods ("..") or contain two periods ("..") followed by or , nor can it contain any invalid characters. You can query for invalid characters by using the method.
+
+> [!NOTE]
+> When you use the asterisk wildcard character in a `searchPattern` such as "\*.txt", the number of characters in the specified extension affects the search as follows:
+>
+> - If the specified extension is exactly three characters long, the method returns files with extensions that begin with the specified extension. For example, "\*.xls" returns both "book.xls" and "book.xlsx".
+> - In all other cases, the method returns files that exactly match the specified extension. For example, "\*.ai" returns "file.ai" but not "file.aif".
+>
+> When you use the question mark wildcard character, this method returns only files that match the specified file extension. For example, given two files, "file1.txt" and "file1.txtother", in a directory, a search pattern of "file?.txt" returns just the first file, whereas a search pattern of "file\*.txt" returns both files.
+
+> [!NOTE]
+> Because this method checks against file names with both the 8.3 file name format and the long file name format, a search pattern similar to "\*1\*.txt" may return unexpected file names. For example, using a search pattern of "\*1\*.txt" returns "longfilename.txt" because the equivalent 8.3 file name format is "LONGFI~1.TXT".
+
+ The and methods differ as follows: When you use , you can start enumerating the collection of names before the whole collection is returned; when you use , you must wait for the whole array of names to be returned before you can access the array. Therefore, when you are working with many files and directories, can be more efficient.
+
+ The `path` parameter can specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see .
+
+ The `path` parameter is not case-sensitive.
+
+ For a list of common I/O tasks, see [Common I/O Tasks](~/docs/standard/io/common-i-o-tasks.md).
+
+ ]]>
+
+
+ is a file name.
+
+ -or-
+
+ A network error has occurred.
+ The caller does not have the required permission.
+
+ is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using .
+
+ -or-
+
+ doesn't contain a valid pattern.
+
+ or is .
+ The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path is not found or is invalid (for example, it is on an unmapped drive).
@@ -2605,7 +2830,7 @@ Directory::CreateDirectory("Public\\Html");
is not a valid value.
The caller does not have the required permission.
The specified path is not found or is invalid (for example, it is on an unmapped drive).
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
is a file name.
@@ -2697,7 +2922,7 @@ Directory::CreateDirectory("Public\\Html");
is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with .
is .
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
is a file name.
The specified path is invalid (for example, it is on an unmapped drive).
@@ -2799,7 +3024,7 @@ Directory::CreateDirectory("Public\\Html");
does not contain a valid pattern.
or is .
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
is a file name.
The specified path is invalid (for example, it is on an unmapped drive).
@@ -2838,12 +3063,57 @@ Directory::CreateDirectory("Public\\Html");
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
- To be added.
+ The relative or absolute path to the directory to search. This string is not case-sensitive.
+ The search string to match against the names of subdirectories in . This parameter can contain a combination of valid literal and wildcard characters, but it doesn't support regular expressions.
+ An object that describes the search and enumeration configuration to use.
+ Returns an array of file names and directory names that match a search pattern and enumeration options in a specified path.
+ An array of file names and directory names that match the specified search pattern and enumeration options, or an empty array if no files or directories are found.
+
+ method if a specific sort order is required.
+
+ `searchPattern` can be a combination of literal and wildcard characters, but it doesn't support regular expressions. The following wildcard specifiers are permitted in `searchPattern`.
+
+|Wildcard specifier|Matches|
+|------------------------|-------------|
+|\* (asterisk)|Zero or more characters in that position.|
+|? (question mark)|Zero or one character in that position.|
+
+ Characters other than the wildcard are literal characters. For example, the `searchPattern` string "\*t" searches for all names in `path` ending with the letter "t". The `searchPattern` string "s\*" searches for all names in `path` beginning with the letter "s".
+
+ `searchPattern` cannot end in two periods ("..") or contain two periods ("..") followed by or , nor can it contain any invalid characters. You can query for invalid characters by using the method.
+
+> [!NOTE]
+> When you use the asterisk wildcard character in a `searchPattern` such as "\*.txt", the number of characters in the specified extension affects the search as follows:
+>
+> - If the specified extension is exactly three characters long, the method returns files with extensions that begin with the specified extension. For example, "\*.xls" returns both "book.xls" and "book.xlsx".
+> - In all other cases, the method returns files that exactly match the specified extension. For example, "\*.ai" returns "file.ai" but not "file.aif".
+>
+> When you use the question mark wildcard character, this method returns only files that match the specified file extension. For example, given two files, "file1.txt" and "file1.txtother", in a directory, a search pattern of "file?.txt" returns just the first file, whereas a search pattern of "file\*.txt" returns both files.
+
+ The `path` parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see .
+
+ The `path` parameter is not case-sensitive.
+
+ For a list of common I/O tasks, see [Common I/O Tasks](~/docs/standard/io/common-i-o-tasks.md).
+
+ ]]>
+
+ The caller does not have the required permission.
+
+ is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method.
+
+ -or-
+
+ does not contain a valid pattern.
+
+ or is .
+ The specified path, file name, or both exceed the system-defined maximum length.
+
+ is a file name.
+ The specified path is invalid (for example, it is on an unmapped drive).
@@ -2881,9 +3151,7 @@ Directory::CreateDirectory("Public\\Html");
The relative or absolute path to the directory to search. This string is not case-sensitive.
The search string to match against the names of files and directories in . This parameter can contain a combination of valid literal path and wildcard (* and ?) characters, but it doesn't support regular expressions.
- One of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories.
-
- The default value is .
+ One of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories. The default value is .
Returns an array of all the file names and directory names that match a search pattern in a specified path, and optionally searches subdirectories.
An array of file the file names and directory names that match the specified search criteria, or an empty array if no files or directories are found.
@@ -2920,7 +3188,7 @@ Directory::CreateDirectory("Public\\Html");
is a zero-length string, contains only white space, or contains invalid characters. You can query for invalid characters by using the method.
--or-
+ -or-
does not contain a valid pattern.
@@ -2935,7 +3203,7 @@ Directory::CreateDirectory("Public\\Html");
is invalid, such as referring to an unmapped drive.
is a file name.
- The specified path, file name, or combined exceed the system-defined maximum length.
+ The specified path, file name, or combined exceed the system-defined maximum length.
The caller does not have the required permission.
The caller does not have the required permission.
@@ -3017,7 +3285,7 @@ Directory::CreateDirectory("Public\\Html");
is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method.
is .
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
The parameter is in an invalid format.
for reading the specified file or directory. Associated enumeration:
@@ -3096,7 +3364,7 @@ Directory::CreateDirectory("Public\\Html");
is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method.
is .
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
The parameter is in an invalid format.
for reading the specified file or directory. Associated enumeration:
@@ -3179,7 +3447,7 @@ Directory::CreateDirectory("Public\\Html");
is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method.
is .
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
for reading the specified file or directory. Associated enumeration:
File and Stream I/O
@@ -3257,7 +3525,7 @@ Directory::CreateDirectory("Public\\Html");
is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method.
is .
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
for reading the specified file or directory. Associated enumeration:
File and Stream I/O
@@ -3402,11 +3670,11 @@ Directory::CreateDirectory("Public\\Html");
is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method.
is .
- The specified path, file name, or both exceed the system-defined maximum length. For more information, see the topic.
+ The specified path, file name, or both exceed the system-defined maximum length. For more information, see the topic.
The specified path was not found.
- is in an invalid format.
- .NET Framework only: The caller does not have the required permissions.
+ is in an invalid format.
+ .NET Framework only: The caller does not have the required permissions.
for reading from files or directories. Associated enumeration:
File and Stream I/O
@@ -3500,7 +3768,7 @@ Directory::CreateDirectory("Public\\Html");
or is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method.
or is .
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
The path specified by is invalid (for example, it is on an unmapped drive).
for reading from and writing to and . Associated enumerations: ,
File and Stream I/O
@@ -3658,7 +3926,7 @@ Directory::CreateDirectory("Public\\Html");
is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method.
is .
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
The caller does not have the required permission.
specifies a value outside the range of dates or times permitted for this operation.
@@ -3730,7 +3998,7 @@ Directory::CreateDirectory("Public\\Html");
is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method.
is .
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
The caller does not have the required permission.
specifies a value outside the range of dates or times permitted for this operation.
@@ -3813,7 +4081,7 @@ Directory::CreateDirectory("Public\\Html");
is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method.
is .
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
The caller does not have the required permission to access unmanaged code.
The specified path was not found.
The specified directory was not found.
@@ -3889,7 +4157,7 @@ Directory::CreateDirectory("Public\\Html");
is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method.
is .
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
The caller does not have the required permission.
The current operating system is not Windows NT or later.
@@ -3970,7 +4238,7 @@ Directory::CreateDirectory("Public\\Html");
is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method.
is .
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
The caller does not have the required permission.
The current operating system is not Windows NT or later.
@@ -4049,7 +4317,7 @@ Directory::CreateDirectory("Public\\Html");
is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method.
is .
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
The caller does not have the required permission.
The current operating system is not Windows NT or later.
@@ -4133,7 +4401,7 @@ Directory::CreateDirectory("Public\\Html");
is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method.
is .
- The specified path, file name, or both exceed the system-defined maximum length.
+ The specified path, file name, or both exceed the system-defined maximum length.
The caller does not have the required permission.
The current operating system is not Windows NT or later.