public DWARFFile getFile(int index) throws IOException {
		if (dwarfVersion < 5) {
			if (0 < index && index <= files.size()) {
				// Retrieve the file by index (index starts at 1)
				return files.get(index - 1);
			}
		}
		else if (dwarfVersion >= 5) {
			if (0 <= index && index < files.size()) {
				return files.get(index);
			}
		}
		throw new IOException(
			"Invalid file index %d for line table at 0x%x: ".formatted(index, startOffset));
	}
Get a file name given a file index.

@param index index of the file
@return file {@link DWARFFile}
@throws IOException if invalid index
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf/line/DWARFLine.java