import type { MoveOperationOptions, OperationResult } from "../types/operations.js"; export declare class FileOperations { private linkParser; private linkRefactorer; private linkValidator; /** * Move a file (markdown, or a non-markdown asset such as an image) and update all links that * reference it. * * This method performs an intelligent move operation that: * * 1. Validates the source and destination paths * 2. Discovers all files that link to the source file * 3. Updates all cross-references to maintain link integrity * 4. If the source is markdown, also updates any links inside the moved file itself * 5. Optionally performs a dry run to preview changes * * A non-markdown source (an image, for example) is moved as-is; only the markdown files that link * to it are updated, since it has no markdown links of its own to refactor. * * @example * ```typescript * const fileOps = new FileOperations(); * * // Simple move * await fileOps.moveFile('docs/old.md', 'docs/new.md'); * * // Move to directory (filename preserved) * await fileOps.moveFile('guide.md', './docs/'); * * // Move a linked image, updating any markdown files that reference it * await fileOps.moveFile('image.png', 'assets/image.png'); * * // Dry run with verbose output * const result = await fileOps.moveFile('api.md', 'reference/api.md', { * dryRun: true, * verbose: true * }); * ```; * * @param sourcePath - The current path of the file to move * @param destinationPath - The target path (can be a directory) * @param options - Configuration options for the move operation * * @returns Promise resolving to detailed operation results */ moveFile(sourcePath: string, destinationPath: string, options?: MoveOperationOptions): Promise; /** Move multiple files in a single operation */ moveFiles(moves: { source: string; destination: string; }[], options?: MoveOperationOptions): Promise; private validateMoveOperation; private discoverProjectFiles; /** * Activate Obsidian vault semantics for an operation when requested. * * Wikilinks in every scanned file are resolved against the whole set so the dependency graph and * rewriter see them as real references, the link refactorer gains the vault context that decides * between a bare stem and a path-qualified rewrite, and ambiguous or duplicate note names are * surfaced as warnings -- a duplicate makes every bare wikilink to it resolve by path proximity, * so a move can silently rebind those links without any text changing. * * @param files - Every parsed markdown file in the scanned tree * @param vaultRoot - Root of the scanned tree, the base for vault-relative rewrites * @param options - The operation's options; obsidian mode activates when set * * @returns Warnings about ambiguous wikilinks and duplicate note names */ private prepareObsidianMode; /** Validate the integrity of links after an operation */ validateOperation(result: OperationResult): Promise<{ valid: boolean; brokenLinks: number; errors: string[]; }>; } //# sourceMappingURL=file-operations.d.ts.map