/**
 * File CRUD operations mirroring the Jupyter Contents API shape.
 *
 * Pure functions — takes the target directory as an argument.
 * Port of Python's gxwf_web/contents.py.
 */
import type { CheckpointModel, ContentsModel } from "./models.js";
export declare const CHECKPOINTS_DIR = ".checkpoints";
export declare class HttpError extends Error {
    readonly status: number;
    constructor(status: number, message: string);
}
export declare function isIgnored(name: string): boolean;
export declare function isWorkflowFile(relPath: string): boolean;
/**
 * Resolve relPath under directory, rejecting traversal and symlink escapes.
 * Returns the absolute path.
 */
export declare function resolveSafePath(directory: string, relPath: string): string;
export declare function readContents(directory: string, relPath: string, includeContent?: boolean, formatOverride?: string | null): ContentsModel;
export declare function writeContents(directory: string, relPath: string, model: ContentsModel, expectedMtime?: Date): ContentsModel;
export declare function deleteContents(directory: string, relPath: string): void;
export declare function createUntitled(directory: string, parentRel: string, type: "file" | "directory", ext?: string | null): ContentsModel;
export declare function renameContents(directory: string, relPath: string, newRelPath: string): ContentsModel;
export declare function createCheckpoint(directory: string, relPath: string): CheckpointModel;
export declare function listCheckpoints(directory: string, relPath: string): CheckpointModel[];
export declare function restoreCheckpoint(directory: string, relPath: string, checkpointId: string): void;
export declare function deleteCheckpoint(directory: string, relPath: string, checkpointId: string): void;
//# sourceMappingURL=contents.d.ts.map