igir
Version:
🕹 A zero-setup ROM collection manager that sorts, filters, extracts or archives, patches, and reports on collections of any size on any OS.
25 lines (24 loc) • 981 B
TypeScript
import ProgressBar from '../../console/progressBar.js';
import DAT from '../../types/dats/dat.js';
import FileFactory from '../../types/files/fileFactory.js';
import Options from '../../types/options.js';
import WriteCandidate from '../../types/writeCandidate.js';
import Module from '../module.js';
/**
* Correct the extensions of output {@link File}s when:
* 1. Not using any DATs (i.e. there's no correction already happening elsewhere)
* 2. The DAT-supplied ROM name is falsey
*/
export default class CandidateExtensionCorrector extends Module {
private static readonly THREAD_SEMAPHORE;
private readonly options;
private readonly fileFactory;
constructor(options: Options, progressBar: ProgressBar, fileFactory: FileFactory);
/**
* Correct the file extensions.
*/
correct(dat: DAT, candidates: WriteCandidate[]): Promise<WriteCandidate[]>;
private romNeedsCorrecting;
private correctExtensions;
private buildCorrectedRom;
}