Method MboxToMarkdownAsync
- Namespace
- LMKit.Document.Conversion
- Assembly
- LM-Kit.NET.dll
MboxToMarkdownAsync(byte[], bool, CancellationToken)
Asynchronously converts an MBOX file (as a byte array) to Markdown.
public static Task<string> MboxToMarkdownAsync(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
Exceptions
- ArgumentNullException
Thrown when
mboxDataisnull.
MboxToMarkdownAsync(string, bool, CancellationToken)
Asynchronously converts an MBOX file at the specified path to Markdown.
public static Task<string> MboxToMarkdownAsync(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
Exceptions
- ArgumentException
Thrown when
inputPathisnullor whitespace.- FileNotFoundException
Thrown when the specified file does not exist.