public ResourceFile createCustomLdefFile(String name, String pspecFilename) {
		Iterable<ResourceFile> files = Application.findFilesByExtensionInApplication(".ldefs");
		ResourceFile originalLdefFile = null;
		for (ResourceFile file : files) {
			if (file.getName().equals(name + ".ldefs")) {
				originalLdefFile = file;
				break;
			}
		}

		try {
			File editedPspecFile = Application.createTempFile(name, ".ldefs");
			BufferedReader br = new BufferedReader(new FileReader(originalLdefFile.getFile(false)));
			BufferedWriter bw = new BufferedWriter(new FileWriter(editedPspecFile));
			String s;
			while ((s = br.readLine()) != null) {
				//if the string is defining a filename, edit that line
				String originalPspecFilename = "atmega256.pspec";

				if (s.contains(originalPspecFilename)) {
					s = s.replace(originalPspecFilename, pspecFilename);
				}

				if (s.contains("avr8:LE:16:atmega256")) {
					s = s.replace("avr8:LE:16:atmega256", "avr8:LE:16:atmega256Test");
				}
				bw.write(s);
				bw.newLine();
			}
			bw.close();
			br.close();
			editedPspecFile.deleteOnExit();
			return new ResourceFile(editedPspecFile);
		}
		catch (IOException e) {
			System.err.println("Error creating test pspec file.");
		}

		return null;
	}
Constructs a string based on parameters, and uses that as the content of a custom pspec file.
Parameters effect the volatility of the symbol "PORTF". 
The pspec file is read by the SleighLanguage object which tracks volatile addresses.
@param symbolVolatile Nullable boolean value that specifies the symbol PORTF volatility setting.
@param symbolSize Nullable integer value specifying the symbol PORTF size in bytes.
@param memoryVolatile Nullable boolean value that specifies the volatility setting of the 
			memory location that includes PORTF.
@param reverseOrder boolean, reverseOrder refers to the order that 'volatile' and 
			'default_symbols' elements appear in the pspec file.
@throws Exception if an error occurred
Ghidra/Framework/SoftwareModeling/src/test/java/ghidra/app/plugin/processors/sleigh/SleighLanguageVolatilityTest.java