Class: abstract
FileReader
A FileReader takes file paths and imports data into Document objects.
Extended by
PapaCSVReader
DocxReader
HTMLReader
ImageReader
LlamaParseReader
MarkdownReader
PDFReader
TextFileReader
Implements
Constructors
new FileReader()
new FileReader():
FileReader
Returns
Methods
loadData()
Parameters
• filePath: string
Returns
Promise
<Document
<Metadata
>[]>
Implementation of
Source
packages/core/src/readers/type.ts:17
loadDataAsContent()
abstract
loadDataAsContent(fileContent
):Promise
<Document
<Metadata
>[]>
Parameters
• fileContent: Buffer
Returns
Promise
<Document
<Metadata
>[]>
Source
packages/core/src/readers/type.ts:15
addMetaData()
static
addMetaData(filePath
): (doc
,index
) =>void
Parameters
• filePath: string
Returns
Function
Parameters
• index: number
Returns
void