/// <summary> /// Tests both the development and non-development secrets directory locations for whether they contain a development machine names text file with the given file name. /// </summary> public static bool DevelopmentMachineNamesTextFileExists(string developmentMachineNamesTextFileName, out string developmentMachineNamesTextFilePath) { // Order of testing locations is biased towards non-development. // Start with the non-development secrets location. var nonDevelopmentLocationForDevelopmentMachineNamesTextFile = PathUtilities.Combine(Utilities.NonDevelopmentSecretsDirectoryPathValue, developmentMachineNamesTextFileName); if (PathUtilities.ExistsFilePath(nonDevelopmentLocationForDevelopmentMachineNamesTextFile)) { developmentMachineNamesTextFilePath = nonDevelopmentLocationForDevelopmentMachineNamesTextFile; return(true); } // Then try the development secrets location. var developmentLocationForDevelopmentMachineNamesTextFile = PathUtilities.Combine(Utilities.DevelopmentSecretsDirectoryPathValue, developmentMachineNamesTextFileName); if (PathUtilities.ExistsFilePath(developmentLocationForDevelopmentMachineNamesTextFile)) { developmentMachineNamesTextFilePath = developmentLocationForDevelopmentMachineNamesTextFile; return(true); } // Else, the development machine names text file does not exist. developmentMachineNamesTextFilePath = BasePathUtilities.UnsetPathValue; return(false); }