@elephant-xyz/cli
Version:
CLI tool for Elephant Network
33 lines • 1.19 kB
TypeScript
export declare class ZipExtractorService {
/**
* Check if a file is a ZIP archive
* @param filePath Path to the file to check
* @returns true if the file is a ZIP archive
*/
isZipFile(filePath: string): Promise<boolean>;
/**
* Extract a ZIP file to a temporary directory
* @param zipPath Path to the ZIP file
* @returns Path to the extracted directory
*/
extractZip(zipPath: string): Promise<string>;
/**
* Check if a path is a subdirectory of a base path
* @param basePath The base directory path
* @param targetPath The path to check
* @returns true if targetPath is within basePath
*/
private isSubPath;
/**
* Clean up a temporary directory
* @param tempDir Path to the temporary directory to remove
*/
cleanup(tempDir: string): Promise<void>;
/**
* Get the root directory path for cleanup (handles nested extraction)
* @param extractedPath The path returned by extractZip
* @returns The root temporary directory that should be cleaned up
*/
getTempRootDir(extractedPath: string): string;
}
//# sourceMappingURL=zip-extractor.service.d.ts.map