In this chapter, we will deal with the basic operations to read files, starting with searching and opening files in directories and subdirectories. Then, we'll describe some of the most common file types and how to read them, including formats such as raw text files, PDFs, and Word documents.
The last recipe will combine them all, showing how to search recursively in a directory for a word in different kinds of files.