Directory.GetFiles Method
.NET Framework 4
Returns the names of files in a specified directory.
This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.
| Name | Description | |
|---|---|---|
|
GetFiles(String) | Returns the names of files (including their paths) in the specified directory. |
|
GetFiles(String, String) | Returns the names of files (including their paths) that match the specified search pattern in the specified directory. |
|
GetFiles(String, String, SearchOption) | Returns the names of files (including their paths) that match the specified search pattern in the specified directory, using a value to determine whether to search subdirectories. |
Illegal characters in path when getting the list of named-pipes
When running this instruction on my machine:
string[] pipeList = Directory.GetFiles(@"\\.\pipe\");
I receive the following exception:
{System.ArgumentException: Illegal characters in path.
This only occurs when Adobe Reader Update process is running. Using ProcessExplorer, I found out that the adobe process uses a named-pipe with non-ascii characters. This is still a bug in the GetFiles method. Reproduceable in .net 2.0, 3.5 & 4.0
Thanks
string[] pipeList = Directory.GetFiles(@"\\.\pipe\");
I receive the following exception:
{System.ArgumentException: Illegal characters in path.
This only occurs when Adobe Reader Update process is running. Using ProcessExplorer, I found out that the adobe process uses a named-pipe with non-ascii characters. This is still a bug in the GetFiles method. Reproduceable in .net 2.0, 3.5 & 4.0
Thanks
- 2/22/2011
- Vincent Lidou
- 2/22/2011
- Vincent Lidou