Method MboxToMarkdown
- Namespace
- LMKit.Document.Conversion
- Assembly
- LM-Kit.NET.dll
MboxToMarkdown(byte[], bool, CancellationToken)
Converts an MBOX file (as a byte array) to Markdown.
public static string MboxToMarkdown(byte[] mboxData, bool stripQuotes = false, CancellationToken cancellation = default)
Parameters
mboxDatabyte[]The MBOX file content as a byte array.
stripQuotesboolWhen
true, quoted and reply content is removed from each email body.cancellationCancellationTokenA cancellation token used to cancel the conversion operation.
Returns
- string
A Markdown string representing all email messages in the mailbox.
Exceptions
- ArgumentNullException
Thrown when
mboxDataisnull.
MboxToMarkdown(string, bool, CancellationToken)
Converts an MBOX file at the specified path to Markdown.
public static string MboxToMarkdown(string inputPath, bool stripQuotes = false, CancellationToken cancellation = default)
Parameters
inputPathstringThe file system path to the MBOX file.
stripQuotesboolWhen
true, quoted and reply content is removed from each email body.cancellationCancellationTokenA cancellation token used to cancel the conversion operation.
Returns
- string
A Markdown string representing all email messages in the mailbox.
Exceptions
- ArgumentException
Thrown when
inputPathisnullor whitespace.- FileNotFoundException
Thrown when the specified file does not exist.