/** * Attempts made to rename the fsynced temp sibling over the target before giving up. * **Part of the store contract (04 §1): at least 4.** On Windows a rename onto a file another * process merely has OPEN for reading fails (`EPERM`/`EBUSY`/`EACCES` sharing violation) — and * that includes plain `fs.readFileSync` peers, .NET `File.ReadAllBytes` (`FileShare.Read`), AV * scanners, and indexers. Core Node does NOT retry renames (the design note "Node inherits this * from libuv" was wrong — that behavior lives in `graceful-fs`, which this package does not use), * so the loop lives here, mirroring the C# twin's `MachineCredentialStore.RenameRetryAttempts`. * Without it a lock-holding refresher can silently lose its store write to a µs-scale concurrent * read, leaving the AS-revoked predecessor on disk (the x2 suite observed exactly that as a D10 * grace hit on the Windows CI leg). */ export declare const RENAME_RETRY_ATTEMPTS = 5; /** Backoff between rename attempts, in ms. Contract (04 §1): at least 250. */ export declare const RENAME_RETRY_DELAY_MS = 250; /** Owner-only file mode (`rw-------`) applied to every store file on POSIX. */ export declare const OWNER_ONLY_FILE_MODE = 384; /** Owner-only directory mode (`rwx------`) applied to the store directory on POSIX. */ export declare const OWNER_ONLY_DIRECTORY_MODE = 448; /** * Create `directory` (recursively, no-op when it exists) and restrict it to the owner on POSIX. * Windows relies on the user-profile ACL instead — `chmod` there is a no-op that would only mislead. */ export declare function ensureOwnerOnlyDirectory(directory: string): void; /** * The unique temp-file path used by {@link writeFileAtomicSync} for `targetPath`. * * It is a **same-directory sibling** of the target BY CONTRACT (04 §1): `rename` is only atomic * within one volume, so a temp file in `os.tmpdir()` (potentially another volume/filesystem) would * silently degrade the whole corruption-safety guarantee to a copy. Exported so tests can pin the * sibling placement as a regression check. */ export declare function tempSiblingPathFor(targetPath: string): string; export declare function writeFileAtomicSync(targetPath: string, bytes: Buffer): void; //# sourceMappingURL=atomic-file.d.ts.map