Input/Output and File Handling
In the previous chapter, we laid out the foundations of Bookmarkr, our CLI application for managing bookmarks. We started with a basic console application, and we leveraged the System.CommandLine
library to infuse CLI capabilities into the application.
For now, our CLI application only contains one command (link
), which allows for managing bookmarks by adding new ones or listing, updating, or removing existing ones.
With this chapter, we are working toward two goals:
- To go a bit deeper with options to further control input values for our CLI application’s command options.
- To see how to handle input and output files in a CLI application. This might be handy for import and export operations, making it easier to back up and restore our application’s data and share it with other applications.
Specifically, we’ll cover the following main topics:
- Controlling input values for an option, determining when to...