Rely on IO extensions a bit more

This commit is contained in:
Matt Nadareski
2025-02-19 14:44:46 -05:00
parent fb5e32c14b
commit 66d77eed66

View File

@@ -85,11 +85,7 @@ namespace SabreTools.DatTools
_staticLogger.Verbose($"Folder found: {basePath}"); _staticLogger.Verbose($"Folder found: {basePath}");
// Get a list of all files to process // Get a list of all files to process
#if NET20 || NET35 string[] files = IOExtensions.SafeGetFiles(basePath, "*", SearchOption.AllDirectories);
List<string> files = [.. Directory.GetFiles(basePath, "*")];
#else
List<string> files = [.. Directory.EnumerateFiles(basePath, "*", SearchOption.AllDirectories)];
#endif
// Loop through and add the file sizes // Loop through and add the file sizes
#if NET452_OR_GREATER || NETCOREAPP #if NET452_OR_GREATER || NETCOREAPP