markmv - v1.39.2
    Preparing search index...

    Function moveFile

    • Convenience function for moving a single file: a markdown file or a non-markdown asset (such as an image) that markdown files link to. Any markdown file that references the moved file has its link updated to the new location.

      Parameters

      • sourcePath: string

        The current file path

      • destinationPath: string

        The target file path

      • options: MoveOperationOptions = {}

        Optional configuration

      Returns Promise<OperationResult>

      Promise resolving to operation result

        import { moveFile } from 'markmv';

      const result = await moveFile('docs/old.md', 'docs/new.md', {
      dryRun: true
      });