/** * Atomically write content to a file using temp-file-then-rename pattern. * Write to .tmp, then fs.renameSync to . * Prevents corruption if process crashes mid-write. */ export declare function atomicWriteFile(filePath: string, content: string): void; /** Check if a file or directory exists. */ export declare function fileExists(filePath: string): boolean; /** Check if a path exists AND is a regular file (not a directory). */ export declare function isFile(filePath: string): boolean; /** Ensure a directory exists, creating it recursively if needed. */ export declare function ensureDir(dirPath: string): void; /** * Resolve the package's own root directory (where content/pipeline/, content/knowledge/, etc. live). * Works whether scaffold is run from the repo or installed globally via npm/brew. */ export declare function getPackageRoot(): string; /** Resolve the pipeline directory (bundled, unless running against scaffold itself). */ export declare function getPackagePipelineDir(projectRoot?: string): string; /** Resolve the knowledge directory (bundled, unless running against scaffold itself). */ export declare function getPackageKnowledgeDir(projectRoot?: string): string; /** Resolve the tools directory (bundled, unless running against scaffold itself). */ export declare function getPackageToolsDir(projectRoot?: string): string; /** Resolve the skills template directory (bundled, unless running against scaffold itself). */ export declare function getPackageSkillsDir(projectRoot?: string): string; /** Resolve the methodology directory (bundled, unless running against scaffold itself). */ export declare function getPackageMethodologyDir(projectRoot?: string): string; /** Resolve the guides directory (bundled, unless running against scaffold itself). */ export declare function getPackageGuidesDir(projectRoot?: string): string; /** Resolve the modes directory (bundled, unless running against scaffold itself). */ export declare function getPackageModesDir(projectRoot?: string): string; //# sourceMappingURL=fs.d.ts.map