@struktoai/mirage-core
Version:
A Unified Virtual Filesystem For AI Agents
18 lines • 1.37 kB
TypeScript
import { FlagView } from '../../spec/flag_view.ts';
import { LineFacts, PathSpec } from '../../../types.ts';
import type { CommandFnResult, Context } from '../../config.ts';
/**
* The template a create names, formed as GNU mktemp forms it: the formed
* template, how many X's end its body, and the length of the suffix after
* them. The name stays as typed, so a relative template or directory prints
* and refuses relative: a bare template lives in the working directory, and
* only a line with no template, -p/--tmpdir or -t joins a directory in
* front of it ($TMPDIR if set, else /tmp; -t prefers $TMPDIR over -p).
* Pinned against GNU coreutils 9.7 (debian:stable-slim). Mirrors Python's
* plan_template.
*/
export declare function planTemplate(templateArg: string | undefined, suffixArg: string | undefined, destDir: string, useDestDir: boolean, t: boolean, envTmpdir: string): [string, number, number];
export declare function mktempGeneric(texts: string[], ctx: Context, mkdir: (p: PathSpec) => Promise<void>, write: (p: PathSpec, data: Uint8Array) => Promise<void>, exists?: (p: PathSpec) => Promise<boolean>): Promise<CommandFnResult>;
/** A mktemp line creates its file unless `-u`. Mirrors Python's `facts`. */
export declare function facts(fl: FlagView, _operands: readonly (string | PathSpec)[]): LineFacts;
//# sourceMappingURL=mktemp.d.ts.map