export type FileIdentity = { readonly dev: number; readonly ino: number; readonly mtimeMs: number; readonly size: number; }; export type ParentSnapshot = { readonly path: string; readonly identity: FileIdentity | null; }; export type FileSnapshot = { readonly path: string; readonly relativePath: string; readonly bytes: Buffer | null; readonly identity: FileIdentity | null; readonly parents: readonly ParentSnapshot[]; }; export type WrittenFile = { readonly snapshot: FileSnapshot; readonly nextBytes: Buffer; readonly identity: FileIdentity; }; export declare class InitTransactionError extends Error { constructor(message: string); } export declare function safeProjectPath(projectDir: string, relativePath: string): string; export declare function identity(path: string): FileIdentity; export declare function sameIdentity(left: FileIdentity | null, right: FileIdentity | null): boolean; export declare function readSnapshot(projectDir: string, relativePath: string): FileSnapshot; export declare function sameSnapshot(expected: FileSnapshot, createdDirs?: Set): boolean; export declare function ensureParents(projectDir: string, relativePath: string, createdDirs: Set): void; export declare function removeEmptyParents(path: string, projectDir: string): void; export declare function writeNewFile(path: string, bytes: Buffer): void; export declare function writeTarget(snapshot: FileSnapshot, nextBytes: Buffer, projectDir: string, createdDirs: Set): FileIdentity;