Move a markdown file and update all links that reference it.
This method performs an intelligent move operation that:
The current path of the markdown file to move
The target path (can be a directory)
Configuration options for the move operation
Promise resolving to detailed operation results
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/');
// Dry run with verbose output
const result = await fileOps.moveFile('api.md', 'reference/api.md', {
dryRun: true,
verbose: true
});
Move multiple files in a single operation
Validate the integrity of links after an operation
Core class for performing markdown file operations with intelligent link refactoring.
This class provides the main functionality for moving, splitting, joining, and merging markdown files while maintaining the integrity of cross-references and links.
Example
Basic file move
Example
Dry run with verbose output