private Set<File> findTempDirs(String appName, ApplicationLayout layout) {
		Set<File> discoveredDirs = new LinkedHashSet<>();

		// Legacy temp directories
		String legacyName = SystemUtilities.getUserName() + "-" + appName;
		if (OperatingSystem.CURRENT_OPERATING_SYSTEM.equals(OperatingSystem.WINDOWS)) {
			getDirFromEnv("TEMP", legacyName).ifPresent(discoveredDirs::add);
		}
		else {
			getDirFromProperty("java.io.tmpdir", legacyName).ifPresent(discoveredDirs::add);
		}

		// Newer temp directories always use a lowercase application name
		appName = ApplicationUtilities.normalizeApplicationName(appName);
		String userNameAndAppName = SystemUtilities.getUserName() + "-" + appName;

		// Current temp directories
		File tempDir = layout.getUserTempDir();
		if (tempDir != null && tempDir.isDirectory()) {
			discoveredDirs.add(tempDir);
		}

		// Application system property override (likely not set for AppCleaner)
		getDirFromProperty(PROPERTY_TEMP_DIR, appName).ifPresent(discoveredDirs::add);
		getDirFromProperty(PROPERTY_TEMP_DIR, userNameAndAppName).ifPresent(discoveredDirs::add);

		// XDG environment variable override.
		// This was used briefly in the master branch and then removed, so some users might have 
		// this artifact. We can eventually stop looking here.
		getDirFromEnv(XDG_RUNTIME_DIR, appName).ifPresent(discoveredDirs::add);
		getDirFromEnv(XDG_RUNTIME_DIR, userNameAndAppName).ifPresent(discoveredDirs::add);

		return discoveredDirs;
	}
Finds user temp directories

@param appName The name of the application
@param layout The layout
@return A {@link Set} of discovered user temp directories, ordered such that
  parent directories are directly followed by their subdirectories, if applicable
@see ApplicationUtilities#getDefaultUserTempDir(String)
Ghidra/Framework/Utility/src/main/java/utility/application/AppCleaner.java