UNPKG

@runejs/filestore

Version:

Tools for managing the RuneJS filestore.

37 lines (36 loc) 1.06 kB
import type { Filestore } from '../filestore'; import type { FileData } from '../file-data'; /** * A single OGG file object. */ export declare class OggFile { readonly fileData: FileData; constructor(fileData: FileData); /** * Writes this unpacked OGG file to the disk under `./unpacked/ogg/{oggId}.ogg` */ writeToDisk(): Promise<void>; get fileId(): number; } /** * Controls short jingle (.ogg) file storage. */ export declare class JingleStore { private fileStore; constructor(fileStore: Filestore); /** * Writes all unpacked OGG files to the disk under `./unpacked/ogg/` */ writeToDisk(): Promise<void>; /** * Decodes the specified OGG file. * @param id The ID of the OGG file. * @returns The decoded OggFile object, or null if the file is not found. */ getOgg(id: number): OggFile | null; /** * Decodes all OGG files within the filestore. * @returns The list of decoded OggFile objects from the OGG store. */ decodeJingleStore(): OggFile[]; }