Working with files and folders
One of the most common requirements of a desktop application is to work with files and folders to support a wide range of scenarios: from writing and reading a file to accessing the content of a folder. .NET includes a namespace dedicated to this scenario, called System.IO, which includes many APIs to work with files, directories, and streams. However, we won't cover them in this chapter, because these APIs have been mostly unchanged over the years and, in this book, we're assuming you have a basic knowledge of the .NET ecosystem and Windows desktop development.
The UWP, instead, has introduced a new set of APIs to work with files and folders that are especially important if you have adopted WinUI as a platform. The classic .NET APIs will continue to work but there are some scenarios (such as enabling users to pick a file from a folder) that will require you to use these new APIs. Let's explore them!
Working with folders
Folders...