public static File getDefaultUserSettingsDir(ApplicationProperties applicationProperties,
			ResourceFile installationDirectory) throws FileNotFoundException, IOException {

		ApplicationIdentifier applicationIdentifier =
			new ApplicationIdentifier(applicationProperties);
		String appName = applicationIdentifier.getApplicationName();
		String versionedName = applicationIdentifier.toString();
		if (SystemUtilities.isInDevelopmentMode()) {
			// Add the application's installation directory name to this variable, so that each 
			// branch's project user directory is unique.
			versionedName += "_location_" + installationDirectory.getName();
		}

		// Look for Ghidra-specific system property
		File settingsOverrideDir = getSystemPropertyFile(PROPERTY_SETTINGS_DIR, false);
		if (settingsOverrideDir != null) {
			return createDir(new File(settingsOverrideDir,
				getUserSpecificDirName(settingsOverrideDir, appName) + "/" + versionedName));
		}

		// Look for XDG environment variable
		File xdgConfigHomeDir = getEnvFile(XdgUtils.XDG_CONFIG_HOME, false);
		if (xdgConfigHomeDir != null) {
			return createDir(new File(xdgConfigHomeDir,
				getUserSpecificDirName(xdgConfigHomeDir, appName) + "/" + versionedName));
		}

		File userHomeDir = getJavaUserHomeDir();
		String versionedSubdir = appName + "/" + versionedName;
		return createDir(switch (OperatingSystem.CURRENT_OPERATING_SYSTEM) {
			case WINDOWS -> new File(getEnvFile("APPDATA", true), versionedSubdir);
			case LINUX -> new File(userHomeDir, ".config/" + versionedSubdir);
			case FREE_BSD -> new File(userHomeDir, ".config/" + versionedSubdir);
			case MAC_OS_X -> new File(userHomeDir, "Library/" + versionedSubdir);
			default -> throw new FileNotFoundException(
				"Failed to find the user settings directory: Unsupported operating system.");
		});
	}
Gets the application's default user settings directory.
<p>
NOTE: This method creates the directory if it does not exist.

@param applicationProperties The application properties.
@param installationDirectory The application installation directory.
@return The application's default user settings directory. The returned {@link File} will
  represent an absolute path.
@throws FileNotFoundException if the absolute path of the user settings directory could not 
  be determined.
@throws IOException if the user settings directory could not be created.
Ghidra/Framework/Utility/src/main/java/utility/application/ApplicationUtilities.java