コード例 #1
0
 public IEnumerable <IDirectory> EnumerateDirectories(string SearchPattern, SearchOption Options = SearchOption.TopDirectoryOnly)
 {
     foreach (DirectoryInfo SubDirectory in InternalDirectory.EnumerateDirectories(SearchPattern, Options))
     {
         yield return(new Directory(SubDirectory));
     }
 }
コード例 #2
0
 /// <summary>
 /// Enumerates directories under this directory
 /// </summary>
 /// <param name="SearchPattern">Search pattern</param>
 /// <param name="Options">Search options</param>
 /// <returns>List of directories under this directory</returns>
 public override IEnumerable <IDirectory> EnumerateDirectories(string SearchPattern = "*", SearchOption Options = SearchOption.TopDirectoryOnly)
 {
     if (InternalDirectory != null)
     {
         foreach (System.IO.DirectoryInfo SubDirectory in InternalDirectory.EnumerateDirectories(SearchPattern, Options))
         {
             yield return(new LocalDirectory(SubDirectory));
         }
     }
 }
コード例 #3
0
ファイル: LocalDirectory.cs プロジェクト: JaCraig/FileCurator
        /// <summary>
        /// Enumerates directories under this directory
        /// </summary>
        /// <param name="searchPattern">Search pattern</param>
        /// <param name="options">Search options</param>
        /// <returns>List of directories under this directory</returns>
        public override IEnumerable <IDirectory> EnumerateDirectories(string searchPattern = "*", SearchOption options = SearchOption.TopDirectoryOnly)
        {
            if (!Exists)
            {
                yield break;
            }

            foreach (var SubDirectory in InternalDirectory.EnumerateDirectories(searchPattern, options))
            {
                yield return(new LocalDirectory(SubDirectory));
            }
        }