UNPKG

@runejs/filestore

Version:

Tools for managing the RuneJS filestore.

26 lines (25 loc) 930 B
import { type Filestore } from '../filestore'; import type { FileData } from '../file-data'; /** * Controls misc binary file storage. */ export declare class BinaryStore { private fileStore; constructor(fileStore: Filestore); /** * Writes the specified file or all binary files to the disk. * @param binaryFile [optional] The file to write to disk. Writes all stored binary files to disk if not provided. */ writeToDisk(binaryFile?: FileData): Promise<void>; /** * Fetches the specified binary file. * @param nameOrId The name or ID of the binary file. * @returns The binary FileData object, or null if the file is not found. */ getBinaryFile(nameOrId: string | number): FileData | null; /** * Decodes all binary files within the binary store. * @returns The list of decoded files from the binary store. */ decodeBinaryFileStore(): FileData[]; }