C#
Parameters
- path
- The relative or absolute path to the directory to search. This string is not case-sensitive.
Return Value
Array of the full-path file names in the specified directory. Returns empty array if no files found.Exception | Description |
---|---|
System.IO.IOException | path is a file name. -or- A network error has occurred. |
System.UnauthorizedAccessException | The caller does not have the required permission. |
System.ArgumentException | path is a zero-length string, contains only white space, or contains one or more invalid characters. |
System.ArgumentNullException | path is null . |
System.IO.DirectoryNotFoundException | The specified path is invalid (for example, it is on an unmapped drive). |
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2