import { IOResult } from '../../../../io/types.ts';
import type { StatFn } from '../../../../types.ts';
import { LineFacts, PathSpec } from '../../../../types.ts';
import type { CommandFnResult, Context } from '../../../config.ts';
import { FlagView } from '../../../spec/flag_view.ts';
import type { FlagValue } from '../../../spec/types.ts';
import type { DirProbe, WalkFn } from '../archive/walk.ts';
/** tar's flags as argp read them. Mirrors Python's TarFlags. */
export interface TarFlags {
    create: boolean;
    extract: boolean;
    list: boolean;
    codec: string | null;
    verbose: boolean;
    dereference: boolean;
    toStdout: boolean;
    archive: PathSpec | null;
    directories: PathSpec[];
    typed: [string, string][];
    exclude: string | null;
    oneFileSystem: boolean;
}
/**
 * tar's flags, refused by the tar engine as argp refuses them: the flags, or
 * tar's refusal, exit 2. Mirrors Python's parse_flags.
 */
export declare function parseFlags(bag: Record<string, FlagValue>): TarFlags | IOResult;
/**
 * Plan what the host decides and run mirage-rs's tar over it: -c walks its
 * operands and checks every -C here, then the engine encodes; -t and -x
 * check every -C here, and the engine reads the archive and writes what it
 * extracts where the last -C or the working directory says, on whichever
 * mount owns it. Mirrors Python's tar.
 */
export declare function tarGeneric(flags: TarFlags, paths: PathSpec[], texts: readonly string[], ctx: Context, deps: {
    stream: (p: PathSpec) => AsyncIterable<Uint8Array>;
    stat: StatFn;
    walk: WalkFn;
    isDir: DirProbe;
}, relay?: boolean): Promise<CommandFnResult>;
/**
 * A tar line hands a link operand to its planner as given, which reads `-h`
 * itself, reads below what it archives under `-c`, and writes to create or
 * extract, not to list or extract to stdout. Mirrors Python's `facts`.
 */
export declare function facts(fl: FlagView, _operands: readonly (string | PathSpec)[]): LineFacts;
//# sourceMappingURL=tar.d.ts.map