Table of Contents

Class DirectoryDocumentLoader

Namespace
Mythosia.AI.Rag.Loaders
Assembly
Mythosia.AI.Rag.dll

Loads all supported text files from a directory recursively.

public class DirectoryDocumentLoader : IDocumentLoader
Inheritance
DirectoryDocumentLoader
Implements
Inherited Members

Constructors

DirectoryDocumentLoader(IEnumerable<string>?)

Creates a directory loader.

public DirectoryDocumentLoader(IEnumerable<string>? extensions = null)

Parameters

extensions IEnumerable<string>

Allowed file extensions. If null, uses a default set of text file extensions.

Methods

LoadAsync(string, CancellationToken)

Loads one or more documents from the specified source. A single source may yield multiple documents (e.g., a ZIP archive or a directory).

public Task<IReadOnlyList<DoclingDocument>> LoadAsync(string source, CancellationToken cancellationToken = default)

Parameters

source string

File path, URL, or other source identifier.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<IReadOnlyList<DoclingDocument>>

A list of loaded documents.