In this chapter, we will cover the following recipes:
- Reading the contents of a file
- Ensuring stream closing with the use function
- Reading the contents of a file line by line
- Writing the contents to a file
- Appending a file
- Easy files copying
- Traversing files in a directory