What’s In This Chapter?
- Exploring the directory structure
- Moving, copying, and deleting files and folders
- Reading and writing text in files
- Using streams to read and write files
- Using readers and writers to read and write files
- Compressing files
- Monitor file changes
- Communication using pipes
- Using Windows Runtime streams
Wrox.com Code Downloads for This Chapter
The wrox.com code downloads for this chapter are found at www.wrox.com/go/professionalcsharp6 on the Download Code tab. The code for this chapter is divided into the following major examples:
When you’re reading and writing to files and directories you can use simple APIs, or you can use advanced ones that offer more features. You also have to differentiate between .NET classes and functionality offered from the Windows Runtime. From Universal Windows Platform (UWP) Windows apps, you don’t have access to the file system in any directory; you have access only to specific directories. Alternatively, you can let the user pick files. This chapter covers all these options. You’ll read and write files by using a simple API and get into more features by using streams. You’ll use both .NET types and types from the Windows Runtime, and you’ll mix both of these technologies to take advantage of .NET features with ...