Zum Hauptinhalt springen

Class: TextFileReader

Read a .txt file

Extends

Constructors

new TextFileReader()

new TextFileReader(): TextFileReader

Returns

TextFileReader

Inherited from

FileReader . constructor

Methods

loadData()

loadData(filePath): Promise <Document <Metadata>[]>

Parameters

filePath: string

Returns

Promise <Document <Metadata>[]>

Inherited from

FileReader . loadData

Source

packages/core/src/readers/type.ts:17


loadDataAsContent()

loadDataAsContent(fileContent): Promise <Document <Metadata>[]>

Parameters

fileContent: Buffer

Returns

Promise <Document <Metadata>[]>

Overrides

FileReader . loadDataAsContent

Source

packages/core/src/readers/TextFileReader.ts:9


addMetaData()

static addMetaData(filePath): (doc, index) => void

Parameters

filePath: string

Returns

Function

Parameters

doc: Document <Metadata>

index: number

Returns

void

Inherited from

FileReader . addMetaData

Source

packages/core/src/readers/type.ts:24