Abstract
In this chapter, we looked at how C# supports working with files and directories, using either the File and Directory or FileInfo and DirectoryInfo classes. We saw how to compose and manipulate file paths using the Path class and how to monitor a directory for changes and how to specify which changes we are interested in.
We also explored the support for streams, which are a general-purpose feature for reading and writing sequential byte data to a range of backing stores in a consistent way. Because working with byte values can be very tedious, we also looked at the reader and writer classes that make working with binary and textual representations of built-in type values a breeze.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2010 Adam Freeman
About this chapter
Cite this chapter
Freeman, A. (2010). Files, Streams, and IO. In: Introducing Visual C# 2010. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-3172-1_20
Download citation
DOI: https://doi.org/10.1007/978-1-4302-3172-1_20
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4302-3171-4
Online ISBN: 978-1-4302-3172-1
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)