static String fsrlToPath(FSRL fsrl, FSRL userSrc, boolean stripLeadingPath,
			boolean stripInteriorContainerPath) {

		String fullPath = fsrl.toPrettyFullpathString().replace('|', '/');
		String userSrcPath = userSrc.toPrettyFullpathString().replace('|', '/');
		int filename = fullPath.lastIndexOf('/') + 1;
		int uas = userSrcPath.length();
		int container = uas + 1;

		int leadStart = (stripLeadingPath == false) ? 0 : userSrcPath.lastIndexOf('/') + 1;
		int leadEnd = Math.min(filename, userSrcPath.length());
		String leading = (leadStart < filename) ? fullPath.substring(leadStart, leadEnd) : "";
		String containerPath = container < filename && !stripInteriorContainerPath
				? fullPath.substring(container, filename)
				: "";
		String filenameStr = fullPath.substring(filename);
		String result = FSUtilities.appendPath(leading, containerPath, filenameStr);
		return result;
	}
Convert a imported file's FSRL into a target project path, using the import options
{@link #stripAllContainerPath} and {@link #stripLeadingPath}.
<p>
Not private so it can be accessed by unit tests.

@param fsrl {@link FSRL} to convert to a path
@param userSrc {@link FSRL} of the container file that is the parent of the FSRL being
converted.
@param stripLeadingPath boolean option that causes the path to the file the user
picked to be truncated or left intact.
@param stripInteriorContainerPath boolean option that causes the interior paths (ie.
anything inside the user-added source directory or container file) to be stripped.
@return String path (with '/' separators) created according to the user's options
{@link #stripAllContainerPath} and {@link #stripLeadingPath}.
Ghidra/Features/Base/src/main/java/ghidra/plugins/importer/tasks/ImportBatchTask.java