Skip to main content

Class: abstract FileReader<T>

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

Extended by

Type Parameters

T extends BaseNode = Document

Implements

Constructors

new FileReader()

new FileReader<T>(): FileReader<T>

Returns

FileReader<T>

Methods

loadData()

loadData(filePath): Promise<T[]>

Parameters

filePath: string

Returns

Promise<T[]>

Implementation of

BaseReader.loadData

Defined in

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


loadDataAsContent()

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

Parameters

fileContent: Uint8Array

filename?: string

Returns

Promise<T[]>

Defined in

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


addMetaData()

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

Parameters

filePath: string

Returns

Function

Parameters

doc: BaseNode<Metadata>

index: number

Returns

void

Defined in

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