export type TarEntryKind = 'file' | 'directory' | 'other'; export interface TarEntry { /** Entry path exactly as archived, with any leading `./` removed. */ readonly path: string; readonly kind: TarEntryKind; /** Permission bits from the header (the low 12 bits of the mode field). */ readonly mode: number; /** File bytes. Empty for directories. */ readonly data: Buffer; } /** * Walks every entry of a gzipped tar in archive order. * * Throws when the gzip stream does not decompress: a corrupted download must * fail loudly, never read as "the archive was empty". */ export declare function readTarGzEntries(archive: Buffer | Uint8Array): Generator; /** * Extract one regular-file entry by its exact path. Returns the file bytes, or * null when the archive holds no such entry. */ export declare function extractTarGzEntry(archive: Buffer | Uint8Array, entryPath: string): Buffer | null; export interface ExtractTarGzTreeOptions { /** * Leading path components to drop from every entry. npm tarballs put * everything under `package/`, so extracting one uses stripComponents: 1. */ readonly stripComponents?: number; /** Called for each written file, so a caller can report what it installed. */ readonly onFile?: (relativePath: string) => void; } export interface ExtractTarGzTreeResult { readonly files: number; readonly directories: number; readonly bytes: number; } /** * Writes every regular file and directory of a gzipped tar under `destination`, * preserving the executable bit (playwright-core ships shell helpers and an * `xdg-open` that must stay runnable). Entries that are neither files nor * directories, symlinks, devices, hard links, are skipped, because nothing * this extracts is supposed to contain any. */ export declare function extractTarGzTree(archive: Buffer | Uint8Array, destination: string, options?: ExtractTarGzTreeOptions): ExtractTarGzTreeResult; //# sourceMappingURL=browser-driver-archive.d.ts.map