private static string[] GetFiles(string directoryPath) { string[] filePaths = FileHandling.GetAllFiles(directoryPath); // -1 for the selected directory Globals.TotalCount += filePaths.Length - 1; return(filePaths); }
private static string[] GetFiles(string directoryPath, out string newDirectoryPath) { try { if (Globals.ObfuscateFileNames) { directoryPath = ObfuscateDirectoryNames.AllDirectories(directoryPath); } } catch (Exception ex) when(ExceptionFilters.FileAccess(ex)) { DisplayMessage.FilePathException(directoryPath, ex.GetType().Name, "Unable to obfuscate the directory names."); } newDirectoryPath = directoryPath; string[] filePaths = FileHandling.GetAllFiles(directoryPath); // -1 for the selected directory Globals.TotalCount += filePaths.Length - 1; return(filePaths); }