UNPKG

newmax-utils

Version:
27 lines (26 loc) 1.13 kB
/// <reference types="node" /> /// <reference types="node" /> type FileDataType = { path: string; fileName: string; filePath: string; }; declare function save(path: string, fileName: string, data: any): Promise<FileDataType>; declare function copy(path: string, fileName: string, moveFolder: string): Promise<FileDataType>; declare function readFileAsync(filePath: string): Promise<Buffer>; declare function getDirFiles(dirPath: string): Promise<string[]>; declare function unzip(buffer: string | NodeJS.ArrayBufferView | ArrayBuffer): Promise<Buffer>; declare function zipDirectory(sourceDir: string, outPath: string): Promise<void>; declare function getBase64Image(filePath: string): Promise<string>; declare function saveBase64Image(base64String: string, filePath: string): Promise<void>; export declare const fileActions: { save: typeof save; copy: typeof copy; readFileAsync: typeof readFileAsync; getDirFiles: typeof getDirFiles; unzip: typeof unzip; zipDirectory: typeof zipDirectory; getBase64Image: typeof getBase64Image; saveBase64Image: typeof saveBase64Image; }; export {};