UNPKG

@simbachain/simbats

Version:
50 lines 1.27 kB
/// <reference types="node" /> import * as fs from "fs"; /** * helps read file once we've found it * @param filePath * @param options * @returns */ export declare const promisifiedReadFile: (filePath: fs.PathLike, options: { encoding?: null; flag?: string; }) => Promise<Buffer>; export declare class FileHandler { /** * transfer file from inputPath to outputPath * @param inputPath * @param outputPath * @param parseAsJson */ static transferFile(inputPath: string, outputPath: string, parseAsJson?: boolean): Promise<void>; /** * * @param data * @param downloadLocation * @returns {Promise<any>} */ static download(data: any, downloadLocation: string): Promise<any>; /** * * @param filePath * @returns {Promise<any>} */ static parsedFile(filePath: string): Promise<any>; /** * creates directory recursively * @param filePath */ static makeDirectory(filePath: string): void; /** * deletes a file * @param filePath */ static removeFile(filePath: string): void; /** * deletes a directory * @param filePath */ static removeDirectory(filePath: string): void; } //# sourceMappingURL=filehandler.d.ts.map