public static DomainFile createProgramFile(Project proj, String progName, Language language,
			CompilerSpec compilerSpec, DomainFolder folder) throws InvalidNameException,
			CancelledException, LanguageNotFoundException, IOException {

		if (folder == null) {
			folder = proj.getProjectData().getRootFolder();
		}

		Object consumer = new Object();
		Program p = new ProgramDB(progName, language, compilerSpec, consumer);
		try {
			return folder.createFile(progName, p, null);
		}
		finally {
			p.release(consumer);
		}
	}
Create an empty program file within the specified project folder.
@param proj active project.
@param progName name of program and domain file to be created.
@param language a specified language, or 0 if it does not matter.
@param compilerSpec the compiler spec
@param folder domain folder within the specified project which the
user has permission to write.  If null, the root data folder will be used.
@return new domain file.
@throws InvalidNameException if the filename is invalid
@throws CancelledException if the opening is cancelled 
@throws LanguageNotFoundException if the language cannot be found
@throws IOException if there is an exception creating the program or domain file
Ghidra/Features/Base/src/main/java/ghidra/test/ProjectTestUtils.java