unreal.js
Version:
A pak reader for games like VALORANT & Fortnite written in Node.JS
83 lines (82 loc) • 1.83 kB
TypeScript
/// <reference types="node" />
/// <reference types="ref-napi" />
import { FArchive } from "./FArchive";
import { Stats } from "fs";
import { VersionContainer } from "../versions/VersionContainer";
/**
* File Reader
*/
export declare class FFileArchive extends FArchive {
/**
* Position of the reader
* @type {number}
* @protected
*/
protected position: number;
/**
* Whether to use little endian
* @type {boolean}
* @public
*/
littleEndian: boolean;
/**
* Path to the file
* @type {string}
* @public
*/
path: string;
/**
* FS handle id
* @type {number}
* @public
*/
handle: number;
/**
* FS Stats
* @type {Stats}
* @public
*/
stats: Stats;
/**
* Size of the reader
* @type {number}
* @public
*/
get size(): number;
/**
* Current position
* @type {number}
* @public
*/
get pos(): number;
set pos(pos: number);
/**
* Reads to a buffer
* @param {Buffer} b Destination
* @param {number} off Offset in buffer
* @param {number} len Length to read
* @returns {void}
* @public
*/
readToBuffer(b: Buffer, off?: number, len?: number): void;
/**
* Creates an instance
* @param {?string} path Path to the file
* @param {?VersionContainer} versions Versions
* @constructor
* @public
*/
constructor(path?: string, versions?: VersionContainer);
/**
* Clones this
* @returns {FFileArchive} Clone
* @public
*/
clone(): FFileArchive;
/**
* Returns FArchive info for error
* @returns {string}
* @public
*/
printError(): string;
}