import type { WorldBackupError, WorldBackupErrorCode } from '../../application/ports/outbound/IWorldBackupPort.js'; export declare const LOCKS = ".locks"; /** A failure that ends the operation with this result. */ export declare class Fail extends Error { readonly error: WorldBackupError; constructor(error: WorldBackupError); } export declare const fail: (code: WorldBackupErrorCode, message: string, extra?: Partial) => never; /** * Run `main`, then `cleanup`. A cleanup error never hides the main error (ADR B5.9): * it is appended to the main message, keeping its code and paths. After a successful * `main`, a cleanup error is ignored (the next run cleans up again). */ export declare function withCleanup(main: () => Promise, cleanup: () => Promise): Promise; export declare const isMissing: (e: unknown) => boolean; export declare function lstatOrNull(path: string): Promise; /** Directory names under `path` (no dot entries); `withLinks` also returns symlinks. */ export declare function listDirs(path: string, options?: { withLinks?: boolean; }): Promise; export declare function entries(path: string): Promise; /** Throws unsupported_layout on the first symlink under `path` (inclusive). */ export declare function assertNoSymlinks(path: string, skip?: (p: string) => boolean): Promise; //# sourceMappingURL=support.d.ts.map