Readonly
This commit is contained in:
@ -1,9 +1,11 @@
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace File_Folder_Helper.Helpers;
|
||||
|
||||
internal static class HelperDirectory
|
||||
{
|
||||
|
||||
internal static List<string> GetDirectoryNames(string directory)
|
||||
internal static ReadOnlyCollection<string> GetDirectoryNames(string directory)
|
||||
{
|
||||
List<string> results = [];
|
||||
string? fileName;
|
||||
@ -36,7 +38,7 @@ internal static class HelperDirectory
|
||||
}
|
||||
results.Add(pathRoot);
|
||||
results.Reverse();
|
||||
return results;
|
||||
return new(results);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user