@Override
	public String putStream(SymbolFileInfo symbolFileInfo,
			SymbolServerInputStream symbolServerInputStream, String filename, TaskMonitor monitor)
			throws IOException {
		initStorageLevelIfNeeded(monitor);
		filename = FilenameUtils.getName(filename); // make sure no relative path shenanigans
		String relativeDestinationFilename = getUniqueFileDir(symbolFileInfo) + filename;
		File destinationFile = new File(rootDir, relativeDestinationFilename);
		FileUtilities.checkedMkdirs(destinationFile.getParentFile());
		if (destinationFile.isFile()) {
			Msg.info(this, logPrefix() + ": File already exists: " + destinationFile);
			return relativeDestinationFilename;
		}
		if (destinationFile.isDirectory()) {
			Msg.error(this, logPrefix() + ": File's location already exists and is a directory: " +
				destinationFile);
			Msg.error(this, logPrefix() + ": Possible symbol storage directory misconfiguration!");
			return relativeDestinationFilename;
		}

		File destinationFileTmp = new File(rootDir, relativeDestinationFilename + ".tmp");
		destinationFileTmp.delete();

		long expectedLength = symbolServerInputStream.getExpectedLength();
		String expectedLenMsg =
			expectedLength >= 0 ? (" (" + FileUtilities.formatLength(expectedLength) + ")") : "";
		monitor.setIndeterminate(expectedLength < 0);
		monitor.initialize(expectedLength);
		monitor.setMessage("Storing " + filename + " in local symbol store" + expectedLenMsg);
		try (InputStream is = symbolServerInputStream.getInputStream()) {
			long bytesCopied =
				FileUtilities.copyStreamToFile(is, destinationFileTmp, false, monitor);
			if (symbolServerInputStream.getExpectedLength() >= 0 &&
				bytesCopied != symbolServerInputStream.getExpectedLength()) {
				throw new IOException("Copy length mismatch, expected " +
					symbolServerInputStream.getExpectedLength() + " bytes, got " + bytesCopied);
			}
			if (!destinationFileTmp.renameTo(destinationFile)) {
				throw new IOException(
					"Error renaming temp file " + destinationFileTmp + " to " + destinationFile);
			}
			return relativeDestinationFilename;
		}
		finally {
			destinationFileTmp.delete();
		}
	}
Non-task monitor variant of {@link #isValid(TaskMonitor)}.

@return boolean true if this is a valid symbol store
Ghidra/Features/PDB/src/main/java/pdb/symbolserver/LocalSymbolStore.java