Working with files passed in as options values
Files can be provided as options values to serve as input or output parameters.
As an input parameter, a file’s content can be read to import data into the CLI application. In our case, we could import bookmarks from other browsers, such as Chrome or Firefox, into Bookmarkr.
As an output parameter, a file can be created to export the data that is held by Bookmarkr, which in turn can be imported into other browsers, such as Chrome or Firefox.
Together, these two capabilities can enable backup and restore but also data sharing and exchange scenarios.
Let’s build these features into Bookmarkr!
Important note
Browsers, such as Chrome or Firefox, have their own proprietary structure to import and export bookmarks.
We won’t be performing parsing or conversion to these formats for the sake of simplicity. Our goal is to focus on working with input and output files as part of a CLI application. We will...