import type { IndexCacheStore } from '../../../cache/index/store.ts'; import { IOResult, type ByteSource } from '../../../io/types.ts'; import { PathSpec, type CopyStrategy, type NativeMove, type PrimitiveCopy, type PrimitiveMove, type ReaddirFn, type StatFn } from '../../../types.ts'; import type { FlagView } from '../../spec/types.ts'; import { type BackendKeyFn } from '../utils/copy.ts'; export interface CpFlags { recursive: boolean; noClobber: boolean; verbose: boolean; update: string | null; backup: string | null; suffix: string; targetDir: PathSpec | string | null; noTargetDir: boolean; } export declare function cpFlags(init?: Partial): CpFlags; export interface TransferPolicy { cmdName: string; noClobber: boolean; update: string | null; backup: string | null; suffix: string; } export declare function backupDisplaces(control: string | null): boolean; export declare function updateMode(cmdName: string, fl: FlagView): string | null; export declare function suffixFlag(fl: FlagView): string | null; export declare function backupRaw(fl: FlagView): string | boolean | undefined; export declare function targetFlags(cmdName: string, fl: FlagView): [PathSpec | string | null, boolean]; export declare function parseFlags(fl: FlagView): CpFlags; export declare function splitOperands(cmdName: string, paths: PathSpec[], targetDir: PathSpec | string | null, noTargetDir: boolean): [PathSpec[], PathSpec | null]; export declare function wrapTargetDir(ref: PathSpec, virtual: string): PathSpec; export declare function targetDirError(cmdName: string, stat: StatFn, target: PathSpec): Promise; export declare function entryKind(stat: StatFn, path: PathSpec): Promise<{ exists: boolean; isDir: boolean; }>; export declare function sourceKind(stat: StatFn, path: PathSpec): Promise<{ exists: boolean; isDir: boolean; strerror: string | null; }>; export declare function overwriteTypeError(cmdName: string, src: PathSpec, srcIsDir: boolean, target: PathSpec, targetExists: boolean, targetIsDir: boolean): string | null; export declare function overwriteGate(policy: TransferPolicy, stat: StatFn, src: PathSpec, target: PathSpec, errors: string[]): Promise; export declare function makeBackup(policy: TransferPolicy, strategy: CopyStrategy | PrimitiveMove | NativeMove, stat: StatFn, readdir: ReaddirFn | undefined, target: PathSpec, writes: Record, errors: string[], index?: IndexCacheStore): Promise<{ backup: PathSpec | null; ok: boolean; }>; export declare function cpWalk(readdir: ReaddirFn, stat: StatFn, root: PathSpec, index?: IndexCacheStore, cmdName?: string, errors?: string[]): Promise<{ path: string; isDir: boolean; }[]>; export declare function copyEntries(cmdName: string, strategy: PrimitiveCopy | PrimitiveMove, stat: StatFn, src: PathSpec, target: PathSpec, entries: { path: string; isDir: boolean; }[], errors: string[], index?: IndexCacheStore, opts?: { policy?: TransferPolicy; writes?: Record; reads?: Record; lines?: string[] | undefined; }): Promise<{ copiedAll: boolean; wroteAny: boolean; }>; export declare function cpGeneric(paths: PathSpec[], stat: StatFn, strategy: CopyStrategy, flags: CpFlags, index?: IndexCacheStore, backendKey?: BackendKeyFn, readdir?: ReaddirFn): Promise<[ByteSource | null, IOResult]>; //# sourceMappingURL=cp.d.ts.map