export interface AtomicJsonFileOptions { rootLabel: string; directoryLabel: string; fileLabel: string; ensureDirectory: (directory: string) => void; fsyncNewRootParent?: boolean; fsyncNewDirectoryParent?: boolean; } export interface AtomicPrivateJsonReplaceOptions { temporaryPath: string; beforeRename?: () => void; cleanupTemporary: (temporaryPath: string) => void; } /** Atomically replace one private JSON record without following symlinks. */ export declare function atomicSaveJsonFile(filePath: string, value: unknown, options: AtomicJsonFileOptions): void; /** Replace one private JSON file after its caller validates path policy. */ export declare function atomicReplacePrivateJsonFile(filePath: string, value: unknown, options: AtomicPrivateJsonReplaceOptions): void; /** Read one regular private JSON record without following its final path. */ export declare function readJsonFileNoFollow(filePath: string, label: string): unknown; export declare function assertRealDirectory(value: string, label: string): void; export declare function fsyncDirectory(directory: string): void; export declare function isNodeError(error: unknown, code?: string): error is NodeJS.ErrnoException;