import type { BoxAccessor } from '../../accessor/box.ts';
import type { WriteCondition } from '../../cache/types.ts';
import type { FileStat, PathSpec } from '../../types.ts';
import type { Handed } from '../../vfs/types.ts';
import type { StaleWriteError } from '../../errors/types.ts';
import { type BoxItem } from './api.ts';
/**
 * Clear the file a copy or move lands on, held to the version read. Returns
 * the op's condition, null when unconditional. Mirrors Python's `replace_file`.
 */
export declare function replaceFile(accessor: BoxAccessor, dst: PathSpec, lead: BoxItem | null): Promise<WriteCondition | null>;
/**
 * The refusal for a copy or move whose cleared destination came back. The
 * condition the op sent stays held, whatever took the name. Mirrors Python's
 * `retaken`.
 */
export declare function retaken(err: unknown, cond: WriteCondition | null, dst: PathSpec): Promise<StaleWriteError | null>;
/**
 * Copy a file or folder server-side, recording each path it changed. Each path
 * is recorded as it lands; a replaced file only once its copy lands, so through
 * the clear the line keeps its version. A landed path also lifts the line's lost
 * marks on it, and beneath it for a folder copied whole. The dispatcher evicts
 * what the copy changed, also when it fails. Answers the copy's stat, null for
 * a merge or a reply that names none.
 */
export declare function copy(accessor: BoxAccessor, src: PathSpec, dst: PathSpec, handed?: Handed): Promise<FileStat | null>;
//# sourceMappingURL=copy.d.ts.map