Skip to main content

Class: SimpleDirectoryReader

Read all the documents in a directory. By default, supports the list of file types in the FILE_EXT_TO_READER map.

Extends

  • AbstractSimpleDirectoryReader

Constructors

new SimpleDirectoryReader()

new SimpleDirectoryReader(observer?): SimpleDirectoryReader

Parameters

observer?: ReaderCallback

Returns

SimpleDirectoryReader

Inherited from

AbstractSimpleDirectoryReader.constructor

Defined in

packages/readers/directory/dist/index.d.ts:18

Methods

loadData()

loadData(params)

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

Parameters

params: SimpleDirectoryReaderLoadDataParams

Returns

Promise<Document<Metadata>[]>

Overrides

AbstractSimpleDirectoryReader.loadData

Defined in

packages/readers/directory/dist/index.d.ts:32

loadData(directoryPath)

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

Parameters

directoryPath: string

Returns

Promise<Document<Metadata>[]>

Overrides

AbstractSimpleDirectoryReader.loadData

Defined in

packages/readers/directory/dist/index.d.ts:33