@runejs/filestore
Version:
Tools for managing the RuneJS filestore.
38 lines (37 loc) • 1.4 kB
TypeScript
import { FileData } from './file-data';
import type { FileIndex } from './file-index';
import { type FilestoreChannels } from './data';
export declare class Archive extends FileData {
/**
* A map of files housed within this Archive.
*/
files: Map<number, FileData>;
/**
* The type of file, either an `archive` or a plain `file`.
*/
type: 'archive' | 'file';
private decoded;
/**
* Creates a new `Archive` object.
* @param id The ID of the Archive within it's File Index.
* @param index The File Index that this Archive belongs to.
* @param filestoreChannels The main filestore channel for data access.
*/
constructor(id: number, index: FileIndex, filestoreChannels: FilestoreChannels);
/**
* Creates a new `Archive` object.
* @param fileData Data about a file that's being recognized as an Archive.
* @param index The File Index that this Archive belongs to.
* @param filestoreChannels The main filestore channel for data access.
*/
constructor(fileData: FileData, index: FileIndex, filestoreChannels: FilestoreChannels);
/**
* Fetches a file from this Archive by ID.
* @param fileId The ID of the file to find.
*/
getFile(fileId: number): FileData | null;
/**
* Decodes the packed Archive files from the filestore on disk.
*/
decodeArchiveFiles(): void;
}