This method is not recursive.
For subdirectories, the FileSystemInfo objects returned by this method can be cast to the derived class DirectoryInfo. Use the FileAttributes value returned by the FileSystemInfo..::.Attributes property to determine whether the FileSystemInfo represents a file or a directory.
Wild cards are permitted. For example, the searchPattern string "*t" searches for all directory names in path ending with the letter "t". The searchPattern string "s*" searches for all directory names in path beginning with the letter "s".
The string ".." can only be used in searchPattern if it is specified as a part of a valid directory name, such as in the directory name "a..b". It cannot be used to move up the directory hierarchy. If there are no files or directories, or no files or directories that match the searchPattern string in the DirectoryInfo, this method returns an empty array.
For a list of common I/O tasks, see Common I/O Tasks.