UNPKG

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.

34 lines (33 loc) • 1.34 kB
import ProgressBar from '../../console/progressBar.js'; import DAT from '../../types/dats/dat.js'; import File from '../../types/files/file.js'; import Options from '../../types/options.js'; import Module from '../module.js'; /** * If no {@link DAT}s are provided, implicitly create some. A {@link DAT} will be created for every * subdirectory that contains files, and {@link Game}s will be named after each file's extracted * path (without the extension). */ export default class DATGameInferrer extends Module { private static readonly DEFAULT_DAT_NAME; private readonly options; constructor(options: Options, progressBar: ProgressBar); /** * Infer {@link Game}s from input files. */ infer(romFiles: File[]): Promise<DAT[]>; private createDAT; /** * Different types of archives will return different checksums when quick scanning. This will * result in files that are actually the same having different hash codes. * Look for files that are the same, combine all known checksums, and enrich files with all * known checksum information. */ private static enrichLikeFiles; private static combineLikeChecksums; private static getGameName; private inferArchiveEntries; private inferBinCueFiles; private inferGdiFiles; private inferRawFiles; }