import { BuildContext } from './BuildContext'; import { FST, Audit } from '../types'; declare function canonPath(path: string): string; declare function canonFolder(folder: string): string; declare class FileHandler { when: number; fs: () => FST; now: () => number; folder: string; audit: Audit; maxdepth: number; existing: { txt: any; bin: any; }; control: { dryrun: boolean; duplicate: boolean; version: boolean; }; duplicateFolder: () => string; last: () => number; addmeta: (file: string, meta: any) => void; metafile: () => string; files: { preserved: string[]; written: string[]; presented: string[]; diffed: string[]; merged: string[]; conflicted: string[]; unchanged: string[]; }; createdDirs: Set; savedPaths: Set; filelogged: Record>; constructor(bctx: BuildContext, existing: { txt: any; bin: any; }, control: { dryrun: boolean; duplicate: boolean; version: boolean; }); relative(path: string, whence?: string): string; withinFolder(path: string): boolean; saveBinary(path: string, newContentSource: string | Buffer, whence?: string): void; save(path: string, newContentSource: string | Buffer, write?: boolean | string, whence?: string, mode?: number, isText?: boolean): void; private decision; copy(frompath: string, topath: string, write?: boolean | string, whence?: string): void; merge(generated: string, baseline: string, existing: string, why: string[]): { content: string; conflict: boolean; outcome: string; }; diff(generated: string, existing: string): string; existsFile(path: string, whence?: string): boolean; copyFile(frompath: string, topath: string, whence?: string): void; loadJSON(path: string, opts?: any | string, whence?: string): any; saveJSON(path: string, json: any, opts?: any | string, whence?: string): any; loadFile(path: string, opts?: any | string, whence?: string): string | Buffer; loadSource(path: string, opts?: any | string, whence?: string): string | Buffer; private load; ensureFolder(path: string): void; private ensureDir; private chmodUnchanged; private writeFileAtomic; saveFile(path: string, content: string | Buffer, opts?: any | string, whence?: string): void; filelog(kind: string, path: string): void; } declare function annotatedPath(target: string, kind: string): string; declare function validName(name: any, kind: string, errmark: string): void; declare function validPath(path: string, maxdepth: number, errmark: string): void; export { annotatedPath, canonFolder, canonPath, validName, validPath, FileHandler };