Class: SimpleDirectoryReader
Read all the documents in a directory. By default, supports the list of file types in the FILE_EXT_TO_READER map.
Implements
Constructors
constructor
• new SimpleDirectoryReader(observer?
): SimpleDirectoryReader
Parameters
Name | Type |
---|---|
observer? | ReaderCallback |
Returns
Defined in
packages/core/src/readers/SimpleDirectoryReader.ts:67
Properties
observer
• Private
Optional
observer: ReaderCallback
Defined in
packages/core/src/readers/SimpleDirectoryReader.ts:67
Methods
doObserverCheck
▸ doObserverCheck(category
, name
, status
, message?
): boolean
Parameters
Name | Type |
---|---|
category | "file" | "directory" |
name | string |
status | ReaderStatus |
message? | string |
Returns
boolean
Defined in
packages/core/src/readers/SimpleDirectoryReader.ts:149
loadData
▸ loadData(params
): Promise
<Document
<Metadata
>[]>
Parameters
Name | Type |
---|---|
params | SimpleDirectoryReaderLoadDataParams |
Returns
Implementation of
Defined in
packages/core/src/readers/SimpleDirectoryReader.ts:69
▸ loadData(directoryPath
): Promise
<Document
<Metadata
>[]>
Parameters
Name | Type |
---|---|
directoryPath | string |
Returns
Implementation of
BaseReader.loadData