Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
The Modern C# Challenge

You're reading from   The Modern C# Challenge Become an expert C# programmer by solving interesting programming problems

Arrow left icon
Product type Paperback
Published in Oct 2018
Publisher Packt
ISBN-13 9781789535426
Length 362 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Rod Stephens Rod Stephens
Author Profile Icon Rod Stephens
Rod Stephens
Arrow right icon
View More author details
Toc

Files and Directories

This chapter describes problems that work with files and directories. Some merely provide practice on working with files and the filesystem. You may find others to be a welcome addition to your programming toolkit. For example, some examples show how to search for duplicate files, load an image file without locking it, and save JPG images with different levels of compression.

Note that working with files and directories can be particularly dangerous for a program because that are many ways those operations can fail. For example, a directory might not exist, a file might be locked, a program might not have permission to read or write in a particular directory, or a disk drive may be corrupted. The examples in this chapter use try…catch blocks to protect themselves from unexpected file and directory errors but, to save space, I have not included...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime