UNPKG

axiodb

Version:

The Pure JavaScript Alternative to SQLite. Embedded NoSQL database for Node.js with MongoDB-style queries, zero native dependencies, built-in InMemoryCache, and web GUI. Perfect for desktop apps, CLI tools, and embedded systems. No compilation, no platfor

32 lines (31 loc) 1.23 kB
/** * Compresses a folder into a tar.gz archive. * * @param sourceFolder - The path to the folder to be compressed * @param outPath - The destination path for the compressed archive * @returns A Promise that resolves when compression is complete * * @example * // Compress a folder to a tar.gz file * await tarGzFolder('/path/to/source', '/path/to/archive.tar.gz'); */ export declare function tarGzFolder(sourceFolder: string, outPath: string): Promise<string>; /** * Unzips a .tar.gz file to a specified destination folder * * @param zipFilePath - The path to the compressed file to be unzipped * @param destFolder - The destination folder where the contents will be extracted * @returns A promise that resolves with the destination folder path when unzipping is complete * @throws Will reject the promise with an error if unzipping fails * * @example * ```typescript * try { * const extractedPath = await unzipFile('/path/to/archive.tar.gz', '/path/to/destination'); * console.log(`Files extracted to ${extractedPath}`); * } catch (error) { * console.error('Failed to unzip file:', error); * } * ``` */ export declare function unzipFile(zipFilePath: string, destFolder: string): Promise<string>;