liveBook · Manning

DirectoryLoader

DirectoryLoader is a LangChain document-loading component that discovers files in a directory and delegates format-specific extraction to an underlying loader.

How 2 Manning books explain it

Build Python Web Apps with Streamlit

DirectoryLoader is a LangChain loader that discovers and loads files from a specified directory.

How it is used
Loads text files from a directory as the ingestion stage of a retrieval-augmented application.
How deep it goes
Defines glob selection, delegated file loading, and Document output, then defers chunking to a separate splitter.
Examples
Uses an articles/ folder, the **/*.txt pattern, TextLoader, and a loader.load() call.
What you can do after
Apply it via LangChain to turn a directory of text files into documents ready for splitting and vector storage.

Read how Build Python Web Apps with Streamlit explains DirectoryLoader →

Machine Learning Platform Engineering

DirectoryLoader is a document-loading component that recursively discovers files in directories and converts them into standardized document objects.

How it is used
Loads recursively organized documentation into the retrieval pipeline used to build a searchable knowledge base.
How deep it goes
Explains recursive traversal, file matching, loader selection, encoding, and loading, then hands documents to chunking.
Examples
Uses nested Markdown documentation, TextLoader, UTF-8 decoding, and a FAISS indexing pipeline as concrete examples.
What you can do after
Build it from scratch by loading selected files into standardized documents for chunking and vector indexing.

Read how Machine Learning Platform Engineering explains DirectoryLoader →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.