C# File System Tips and Tricks
1h 16mBeginner2017-04-05
Authors

Jesse Freeman
Head of Partner and Framework Marketing at Amazon
Course details
You may often need to access the underlying file system within your C# application. In this course, discover how to work with .NET System.IO classes for accessing the file system. Instructor Jesse Freeman shows how to create, delete, and move folders using the Directory class, as well as how to create, read, copy, edit, and move config files. Plus, he explains how to protect your file system, and organize your file access logic by abstracting out your file system API calls into a single class.
Learning objectives
State the type of variable that holds a list of multiple directories.
Explain how to convert the integer x to a FolderNames enum.
List how to refactor the code when you have student, courseb and course content information in one file.
Identify the best approach to know what functions to factor out that belong to System.IO namespace.
Identify what class to use to read input from the user.
Assess value of (int)Days.Mon in the following enum?: enum Days { Sun, Mon, Tue, Wed, Thu, Fri, Sat };.
Learning objectives
State the type of variable that holds a list of multiple directories.
Explain how to convert the integer x to a FolderNames enum.
List how to refactor the code when you have student, courseb and course content information in one file.
Identify the best approach to know what functions to factor out that belong to System.IO namespace.
Identify what class to use to read input from the user.
Assess value of (int)Days.Mon in the following enum?: enum Days { Sun, Mon, Tue, Wed, Thu, Fri, Sat };.
Skills covered
C#Tips, Tricks, & TechniquesProgramming LanguagesMicrosoftSoftware Development
Concepts
0. Introduction
- 01 - Welcome
- 02 - Using the exercise files
1. File System Intro
- 03 - Introduction to C#'s file I O APIs
- 04 - Creating a simple command line app
2. Working with Folders
- 05 - Creating a new folder
- 06 - Creatiing multiple folders
- 07 - Deleting folders
- 08 - Copying folders
- 09 - Cleaning up folder logic
3. Working with Files
- 10 - Creating a file
- 11 - Creating a config file
- 12 - Reading a config file
- 13 - Copying, editing, and moving a config file
- 14 - Saving images
4. File Utility
- 15 - Organizing file access logic
- 16 - Resusability
- 17 - Protecting the file system
Conclusion
- 18 - Next steps
Related courses
- Developing Distributed Applications with C# and ZeroMQ
- C++ Best Practices for Developers
- Oracle Database 12c: Administration
- Complete Guide to C Programming Foundations
- Mirrorless 4K Cameras for Video Production
- Unity Medical Visualization: 03 Deployment and Usability
- C: Data Structures, Pointers, and File Systems
- Level Up: C++