import type { FileHandle } from "fs/promises"; export type RegularFileSyncOutcome = "synced" | "unsupported-windows-eperm"; export type DirectorySyncOutcome = "synced" | "unsupported-windows-eperm"; export type DurabilityWarningSubsystem = "session pointer start/reconcile" | "session pointer end" | "native-hook setup" | "native-hook uninstall" | "native-hook claim-journal recovery"; export interface RegularFileDurabilityTracker { degraded: boolean; regularFileDegraded?: boolean; directoryDegraded?: boolean; } /** * Windows can report EPERM when fsync is unsupported for an otherwise valid * regular-file handle. Only that platform/error pair is a durability * capability limitation; every other failure remains fatal. */ export declare function syncRegularFile(handle: Pick, platform?: NodeJS.Platform): Promise; /** * Windows can also report EPERM when fsync is unsupported for an otherwise * valid directory handle. Keep the capability boundary as narrow as the * regular-file fallback: every other platform/error pair remains fatal. */ export declare function syncDirectory(handle: Pick, platform?: NodeJS.Platform): Promise; export declare function recordRegularFileSyncOutcome(tracker: RegularFileDurabilityTracker, outcome: RegularFileSyncOutcome): void; export declare function recordDirectorySyncOutcome(tracker: RegularFileDurabilityTracker, outcome: DirectorySyncOutcome): void; export declare function emitDegradedDurabilityWarning(subsystem: DurabilityWarningSubsystem, tracker: RegularFileDurabilityTracker): void; //# sourceMappingURL=file-durability.d.ts.map