public synchronized PackedDatabase saveAs(String itemName, File dir, String packedFileName,
			TaskMonitor monitor) throws IOException, DuplicateFileException, CancelledException {

		if (isTransactionActive())
			throw new IllegalStateException("Can't saveAs during transaction");
		ResourceFile packedDbFile = new ResourceFile(new File(dir, packedFileName));
		pdb = new PackedDatabase(this, packedDbFile, itemName, null, monitor);

		return pdb;
	}
Save open database to a new packed database.
If another PackedDatabase was associated with this handle prior to this invocation
it should be disposed to that the underlying database resources can be cleaned-up.
@param itemName
@param dir
@param packedFileName
@param monitor
@return new packed Database object now associated with this handle.
@throws CancelledException if task monitor cancelled operation.
@throws IOException
@throws DuplicateFileException
Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/db/PackedDBHandle.java