private static RecoveryFile getRecoveryFile(LocalBufferFile srcBf, File[] snapshotFiles) {
		RecoveryFile[] recoveryFiles = new RecoveryFile[2];
		long[] modTimes = new long[2];
		for (int i = 0; i < recoveryFiles.length; i++) {
			if (snapshotFiles[i].exists()) {
				try {
					RecoveryFile rf = new RecoveryFile(srcBf, snapshotFiles[i]);
					if (rf.isValid()) {
						recoveryFiles[i] = rf;
						modTimes[i] = rf.getTimestamp();
					}
					else {
						rf.close();
					}
				}
				catch (IOException e) {
				}
			}
		}

		if (recoveryFiles[0] != null) {
			if (recoveryFiles[1] != null) {
				RecoveryFile closeRf = null;
				try {
					if (modTimes[1] == modTimes[0]) {
						Msg.warn(RecoveryMgr.class,
							"Recover files have same timestamp: " + modTimes[0]);
						closeRf = recoveryFiles[1];
						try {
							recoveryFiles[0].close();
						}
						catch (IOException e) {
						}
						return null; // can not use either file!
					}
					else if (modTimes[1] > modTimes[0]) {
						closeRf = recoveryFiles[0];
						return recoveryFiles[1];
					}
					closeRf = recoveryFiles[1];
					return recoveryFiles[0];
				}
				finally {
					if (closeRf != null) {
						try {
							closeRf.close();
						}
						catch (IOException e) {
						}
					}
				}
			}
			return recoveryFiles[0];
		}
		return recoveryFiles[1];
	}
Returns the recovery change data file for reading or null if one is not available.
The caller must dispose of the returned file before peforming generating any new
recovery snapshots.
@throws IOException
Ghidra/Framework/DB/src/main/java/db/buffers/RecoveryMgr.java