Skip to content
This repository has been archived by the owner on Feb 12, 2019. It is now read-only.

Commit

Permalink
DNN-10109 - code commenting
Browse files Browse the repository at this point in the history
  • Loading branch information
ashishpd committed Jul 27, 2017
1 parent ea7f6ca commit 82a132b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Components/Utility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -278,17 +278,23 @@ private static SHA256 CreateCryptographyProvider()
}
}

/// <summary>
/// Recursively finds file
/// </summary>
/// <returns></returns>
private static IEnumerable<string> GetFiles(string path, string searchPattern, SearchOption searchOption)
{
try
{
//Looking at the root folder only. There should not be any permission issue here.
var files = Directory.GetFiles(path, searchPattern, SearchOption.TopDirectoryOnly).ToList();

if (searchOption == SearchOption.AllDirectories)
{
var folders = Directory.GetDirectories(path, "*", SearchOption.TopDirectoryOnly);
foreach (var folder in folders)
{
//recursive call to the same method
files.AddRange(GetFiles(folder, searchPattern, searchOption));
}
}
Expand Down

0 comments on commit 82a132b

Please sign in to comment.