Files
xSaherElmAiApi/Interfaces/IXFileContentExtractor.cs
T

26 lines
670 B
C#

using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace xAiApi.Interfaces
{
/// <summary>
/// a Service for Extracting File Content ...
/// </summary>
public interface IXFileContentExtractor
{
/// <summary>
/// Check if this extractor supports the specified MIME type ...
/// </summary>
bool CanExtract(string mimeType);
/// <summary>
/// Extract text content from file stream ...
/// </summary>
Task<string> ExtractAsync(
Stream fileStream,
string mimeType,
CancellationToken cancellationToken = default
);
}
}