typesxml
Version:
Open source XML library written in TypeScript
29 lines (28 loc) • 1.04 kB
TypeScript
/*******************************************************************************
* Copyright (c) 2023 - 2024 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse License 1.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/org/documents/epl-v10.html
*
* Contributors:
* Maxprograms - initial API and implementation
*******************************************************************************/
export declare class FileReader {
fileHandle: number;
encoding: BufferEncoding;
blockSize: number;
fileSize: number;
position: number;
firstRead: boolean;
constructor(path: string, encoding?: BufferEncoding);
static detectEncoding(path: string): BufferEncoding;
getEncoding(): BufferEncoding;
setEncoding(encoding: BufferEncoding): void;
read(): string;
skipBOM(buffer: Buffer, bytesRead: number): string;
dataAvailable(): boolean;
getFileSize(): number;
closeFile(): void;
}