import "./fs-safe-defaults.js"; import { type ReadResult } from "@kodelyth/fs-safe/root"; export { FsSafeError, type FsSafeErrorCode } from "@kodelyth/fs-safe/errors"; export { assertAbsolutePathInput, canonicalPathFromExistingAncestor, findExistingAncestor, resolveAbsolutePathForRead, resolveAbsolutePathForWrite, type AbsolutePathSymlinkPolicy, type EnsureAbsoluteDirectoryOptions, type EnsureAbsoluteDirectoryResult, type ResolvedAbsolutePath, type ResolvedWritableAbsolutePath, } from "@kodelyth/fs-safe/advanced"; export { isPathInside } from "@kodelyth/fs-safe/path"; export { pathExists, pathExistsSync } from "@kodelyth/fs-safe/advanced"; export { readLocalFileFromRoots, resolveLocalPathFromRootsSync } from "@kodelyth/fs-safe/advanced"; export { appendRegularFile, appendRegularFileSync, readRegularFile, readRegularFileSync, resolveRegularFileAppendFlags, statRegularFileSync, } from "@kodelyth/fs-safe/advanced"; export { openLocalFileSafely, readLocalFileSafely, resolveOpenedFileRealPathForHandle, root, type OpenResult, type ReadResult, } from "@kodelyth/fs-safe/root"; export { sanitizeUntrustedFileName } from "@kodelyth/fs-safe/advanced"; export { readSecureFile, type SecureFileReadOptions, type SecureFileReadResult, } from "@kodelyth/fs-safe/secure-file"; export { walkDirectory, walkDirectorySync, type WalkDirectoryEntry, type WalkDirectoryOptions, type WalkDirectoryResult, } from "@kodelyth/fs-safe/walk"; export { withTimeout } from "@kodelyth/fs-safe/advanced"; export type ExternalFileWriteOptions = { rootDir: string; path: string; write: (tempPath: string) => Promise; fallbackFileName?: string; tempPrefix?: string; }; export type ExternalFileWriteResult = { path: string; }; export declare function ensureAbsoluteDirectory(dirPath: string, options?: { scopeLabel?: string; mode?: number; }): Promise<{ ok: true; path: string; } | { ok: false; error: Error; }>; export declare function writeExternalFileWithinRoot(options: ExternalFileWriteOptions): Promise; /** @deprecated Use root(rootDir).read(relativePath, options). */ export declare function readFileWithinRoot(params: { rootDir: string; relativePath: string; rejectHardlinks?: boolean; nonBlockingRead?: boolean; allowSymlinkTargetWithinRoot?: boolean; maxBytes?: number; }): Promise; /** @deprecated Use root(rootDir).write(relativePath, data, options). */ export declare function writeFileWithinRoot(params: { rootDir: string; relativePath: string; data: string | Buffer; encoding?: BufferEncoding; mkdir?: boolean; }): Promise;