@Override
	public void output(File outputFile, int fileVersion, TaskMonitor monitor)
			throws IOException, CancelledException {

		BufferFile bf = repository.openDatabase(parentPath, itemName, fileVersion, -1);
		try {
			File tmpFile = Application.createTempFile("ghidra", LocalBufferFile.TEMP_FILE_EXT);
			tmpFile.delete();
			BufferFile tmpBf = new LocalBufferFile(tmpFile, bf.getBufferSize());
			try {
				LocalBufferFile.copyFile(bf, tmpBf, null, monitor);
				tmpBf.close();

				try (InputStream itemIn = new FileInputStream(tmpFile)) {
					ItemSerializer.outputItem(getName(), getContentType(), DATABASE_FILE_TYPE,
						tmpFile.length(), itemIn, outputFile, monitor);
				}
			}
			finally {
				tmpBf.close();
				tmpFile.delete();
			}
		}
		finally {
			bf.close();
		}
	}
Construct a FolderItem for an existing repository database item.
@param repository repository which contains item
@param item repository item
Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/remote/RemoteDatabaseItem.java