示例#1
0
 public IEnumerable <IFile> EnumerateFiles(IEnumerable <string> SearchPattern, SearchOption Options = SearchOption.TopDirectoryOnly)
 {
     foreach (FileInfo File in InternalDirectory.EnumerateFiles(SearchPattern, Options))
     {
         yield return(new File(File));
     }
 }
 /// <summary>
 /// Enumerates files under this directory
 /// </summary>
 /// <param name="SearchPattern">Search pattern</param>
 /// <param name="Options">Search options</param>
 /// <returns>List of files under this directory</returns>
 public override IEnumerable <IFile> EnumerateFiles(string SearchPattern = "*", SearchOption Options = SearchOption.TopDirectoryOnly)
 {
     if (InternalDirectory != null)
     {
         foreach (System.IO.FileInfo File in InternalDirectory.EnumerateFiles(SearchPattern, Options))
         {
             yield return(new LocalFile(File));
         }
     }
 }
示例#3
0
 /// <summary>
 /// Enumerates files under this directory
 /// </summary>
 /// <param name="searchPattern">Search pattern</param>
 /// <param name="options">Search options</param>
 /// <returns>List of files under this directory</returns>
 public override IEnumerable <IFile> EnumerateFiles(string searchPattern = "*", SearchOption options = SearchOption.TopDirectoryOnly)
 {
     if (!Exists)
     {
         yield break;
     }
     foreach (var TempFile in InternalDirectory.EnumerateFiles(searchPattern, options))
     {
         yield return(new LocalFile(TempFile));
     }
 }