markmv - v1.41.7
    Preparing search index...

    Interface OperationResult

    Result of any file operation containing comprehensive status information.

    Provides detailed information about what was changed, created, or deleted during an operation, along with any errors or warnings encountered.

    Handling operation results

    const result: OperationResult = await fileOps.moveFile('old.md', 'new.md');

    if (result.success) {
    console.log(`Operation completed successfully`);
    console.log(`Modified ${result.modifiedFiles.length} files`);
    console.log(`Created ${result.createdFiles.length} files`);
    } else {
    console.error('Operation failed:');
    result.errors.forEach(error => console.error(` ${error}`));
    }
    interface OperationResult {
        changes: OperationChange[];
        createdFiles: string[];
        deletedFiles: string[];
        errors: string[];
        modifiedFiles: string[];
        parseFailures?: { error: string; file: string; stack?: string }[];
        success: boolean;
        warnings: string[];
    }
    Index
    changes: OperationChange[]

    Detailed changes made

    createdFiles: string[]

    Files that were created

    deletedFiles: string[]

    Files that were deleted

    errors: string[]

    Any errors that occurred

    modifiedFiles: string[]

    Files that were modified

    parseFailures?: { error: string; file: string; stack?: string }[]

    Files that failed to parse during the operation; their links could not be checked or rewritten

    Type Declaration

    • error: string

      Message describing the parse error

    • file: string

      Path of the file that failed to parse

    • Optionalstack?: string

      Stack trace of the error, when one was available

    success: boolean

    Whether the operation was successful

    warnings: string[]

    Warnings