From 82a132b21a881e9476c4b400aedbfede287502bf Mon Sep 17 00:00:00 2001 From: Ash Prasad Date: Thu, 27 Jul 2017 09:39:03 -0700 Subject: [PATCH] DNN-10109 - code commenting --- Components/Utility.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Components/Utility.cs b/Components/Utility.cs index fa1f3c3..ac40423 100644 --- a/Components/Utility.cs +++ b/Components/Utility.cs @@ -278,10 +278,15 @@ private static SHA256 CreateCryptographyProvider() } } + /// + /// Recursively finds file + /// + /// private static IEnumerable 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) @@ -289,6 +294,7 @@ private static IEnumerable GetFiles(string path, string searchPattern, S var folders = Directory.GetDirectories(path, "*", SearchOption.TopDirectoryOnly); foreach (var folder in folders) { + //recursive call to the same method files.AddRange(GetFiles(folder, searchPattern, searchOption)); } }