private static List<File> getUserSettingsDirsByTime() {
		ApplicationLayout layout = Application.getApplicationLayout();
		File userSettingsDirectory = Application.getUserSettingsDirectory();

		List<File> appDirs =
			collectAllApplicationDirectories(userSettingsDirectory.getParentFile(), false);

		// Search "legacy" user setting directory locations in case the user has upgraded from an
		// older version
		try {
			File legacyUserSettingsDirectory = ApplicationUtilities.getLegacyUserSettingsDir(
				layout.getApplicationProperties(), layout.getApplicationInstallationDir());
			appDirs.addAll(collectAllApplicationDirectories(
				legacyUserSettingsDirectory.getParentFile(), true));
		}
		catch (FileNotFoundException e) {
			// ignore
		}

		Comparator<File> modifyTimeComparator = (f1, f2) -> {

			//
			// We want to use a real file to tell the last time Ghidra was run, as we cannot
			// trust the directory's last modified time on all platforms
			// 
			File prefs1 = new File(f1, Preferences.APPLICATION_PREFERENCES_FILENAME);
			File prefs2 = new File(f2, Preferences.APPLICATION_PREFERENCES_FILENAME);
			if (!prefs1.exists() || !prefs2.exists()) {
				if (!prefs1.exists()) {
					if (!prefs2.exists()) {
						return 0; // neither file exists (user deleted?)
					}
					return 1; // prefs1 doesn't exist, but prefs2 does--prefer prefs2
				}
				return -1; // prefs1 exists--prefer prefs1
			}

			long modify1 = prefs1.lastModified();
			long modify2 = prefs2.lastModified();
			if (modify1 == modify2) {
				// If same time, compare parent dir names, which contain their version
				return f1.getName().compareTo(f2.getName());
			}
			return (modify1 < modify2) ? 1 : -1;
		};

		Collections.sort(appDirs, modifyTimeComparator);
		return appDirs;
	}
Get all of the applications's settings directories 
({@code .<i>application_name_version</i>}) for various versions in descending order by the 
modification time. In other words, {@code list.get(0)} will be the directory 
with the most recent modification time. If two directories have the same time then the 
directories will simply be sorted based on their pathnames as a string.
<p>
<b>Note: </b>This method ignores Test directories
Ghidra/Framework/Generic/src/main/java/ghidra/framework/GenericRunInfo.java