@Override
	protected String mapSourceFilenameToDest(GFile srcFile) throws IOException {
		String filename = srcFile.getName();
		if (!FSUtilities.getSafeFilename(filename).equals(filename)) {
			throw new IOException("Bad filename in archive: \"" + filename + "\"");
		}
		return filename;
	}
Task that restores a Ghidra Project Archive file (a zip file with a .gar extension)
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/archive/RestoreTask.java