Skip to main content

Class: abstract FileReader

A FileReader takes file paths and imports data into Document objects.

Extended by

Implements

Constructors

new FileReader()

new FileReader(): FileReader

Returns

FileReader

Methods

loadData()

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

Parameters

filePath: string

Returns

Promise<Document<Metadata>[]>

Implementation of

BaseReader.loadData

Defined in

packages/core/schema/dist/index.d.ts:187


loadDataAsContent()

abstract loadDataAsContent(fileContent, filename?): Promise<Document<Metadata>[]>

Parameters

fileContent: Uint8Array

filename?: string

Returns

Promise<Document<Metadata>[]>

Defined in

packages/core/schema/dist/index.d.ts:186


addMetaData()

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

Parameters

filePath: string

Returns

Function

Parameters

doc: Document<Metadata>

index: number

Returns

void

Defined in

packages/core/schema/dist/index.d.ts:188