12. Files and Systems
Overview
This chapter aims to give you an understanding of how to interact with the filesystem. This includes creating and modifying files. You will also learn how to check whether the file exists. We will write to the file and save it on disk. We will then create a command-line application that accepts various flags and arguments. We will also be able to catch signals and determine what to do with them before we exit the program.
In this chapter, you will create command-line applications that accept arguments and display help content. By the end of the chapter, you will be able to handle signals that are sent to the application from the operating system (OS), and control the exit from the application when the OS sends a signal to immediately stop the application.