/** Ensure a directory exists without consulting application configuration or SQL. */ export declare function ensureDirectory(path: string): void; export declare function syncPath(path: string): void; /** Retry-visible entries may come from a failed earlier fsync, not durable state. */ export declare function syncDirectoryChain(path: string, boundary?: string): void; /** Reject traversal and symlink parents before touching a managed destination. */ export declare function managedPath(root: string, name: string): string; export declare function ensurePrivateDirectory(path: string): void; /** Publish a complete asset without ever replacing pre-existing user content. */ export declare function publishAssetDurably(source: string, destination: string): void; export declare function requireRegularFile(path: string): void; export declare function hashFile(path: string): Promise; export declare function copyDurably(source: string, destination: string): void; export declare function writeDurably(path: string, bytes: Uint8Array): void; export declare function moveDurably(source: string, destination: string): void; export type DirectoryListing = { ok: true; path: string; parent: string | null; segments: Array<{ name: string; path: string; }>; dirs: Array<{ name: string; path: string; }>; truncated: boolean; } | { ok: false; code: "outside" | "not_found" | "not_directory"; error: string; }; export declare function browseDirectories(root: string, requested?: string, limit?: number): DirectoryListing; export type LocatedFile = { ok: true; path: string; size: number; } | { ok: false; code: "not_found" | "invalid"; error: string; }; /** Resolve the first existing candidate under an allowlisted real root. */ export declare function locateReadableFile(candidates: string[], allowedRoots: string[], maxSizeBytes?: number): LocatedFile; export declare function readFileBytes(path: string): Buffer; export declare function openFileStream(path: string): import("fs").ReadStream; /** Create one private temporary text file without changing shared temp-directory permissions. */ export declare function writeTemporaryText(content: string, prefix?: string, extension?: string): string; /** Presence hint only; inaccessible entries do not become readable through this inspection. */ export declare function directoryHasReadableEntries(directory: string): boolean; //# sourceMappingURL=io.d.ts.map