using System; using System.Collections.Generic; using System.IO; namespace Renci.SshNet.Abstractions { internal class FileSystemAbstraction { /// /// Returns an enumerable collection of file information that matches a search pattern. /// /// /// The search string to match against the names of files. /// /// An enumerable collection of files that matches . /// /// is null. /// is null. /// The path represented by does not exist or is not valid. public static IEnumerable EnumerateFiles(DirectoryInfo directoryInfo, string searchPattern) { if (directoryInfo == null) throw new ArgumentNullException("directoryInfo"); #if FEATURE_DIRECTORYINFO_ENUMERATEFILES return directoryInfo.EnumerateFiles(searchPattern); #else return directoryInfo.GetFiles(searchPattern); #endif } } }