Working with Files in C# 10

https://www.pluralsight.com/courses/c-sharp-10-working-files

by Jason Roberts

Course Overview

  1. Course Overview
  2. Sandbox

Managing Files and Directories
  1. Introduction
  2. Creating a New Console App
  3. Checking if a File Exists
    • you can use to check if file path is an absolute path: Path.IsPathFullyQualified
  4. Getting the Parent Directory of a Path
  5. Checking if a Directory Exists and Creating New Directories
  6. Copying a File
  7. Moving a File
  8. Getting the File Extension from a File Name
  9. Checkpoint 01- Get the Parent Directory for a Path
  10. Changing a Filename Extension
  11. Checkpoint 02 - Get the Extension Part of a Filename
  12. Deleting a Directory
  13. Enumerating All the Files in a Directory
  14. Summary
  15. Exercise 01- Copying and Deleting Files
Monitoring the File System for Changes
  1. Introduction
  2. Introducing the FileSystemWatcher Class
  3. The IntemalBufferSize Property
  4. Configuring Notification Filters
  5. Additional Properties
  6. Refactoring to Use a FileSystemWatcher
    • use FileSystemWatcher to watch for file changes in a folder
  7. Checkpoint 03 - Define a New FileSystemWatcher Instance in Code
  8. Observing the FileSystemWatcher Events
  9. Automatically Processing Created Files
  10. Automatically Processing Changed Files
  11. Checkpoint 04 - Set a FileSystemWatcher to notify solely on file name changes
  12. Ignoring Duplicate FileSystemWatcher Events with a ConcurrentDictionary
  13. Ignoring Duplicate FileSystemWatcher Events with a MemoryCache
  14. Adding Existing File Processing
  15. FileSystemWatcher Testing Considerations
  16. Summary
Reading and Writing Entire Files Into Memory
  1. Introduction
  2. Reading and Writing Text Files
  3. Checkpoint 05 - Use the File class to read all the text from a file into a string
  4. Reading and Writing Text Files with String Arrays
  5. Checkpoint 06 - Use the File class to write a string instance to a text file
  6. Specifying Text Encodings
  7. Appending Text Content
  8. Reading and Writing the Entire Contents of Binary Files
  9. Checkpoint 07 - Use the File class to read binary data from a file into a byte array
  10. Considerations
  11. Summary
  12. Exercise 03 - Write a simple app to read text from a text file, convert it to uppercase, and write it out to a new file
Reading and Writing Data Incrementally Using Streams
  1. Introduction
  2. An Introduction to Streams
  3. The Benefits of Streams
  4. .NET Class Hierarchy Overview
  5. Using Streams to Read and Write Text Content
  6. FileStreamOptions Properties
  7. Simplifying Stream Reader and StreamWriter Creation
  8. Checkpoint 08 - Use a static method on the File class to define a StreamReader instance
  9. Checkpoint 09 - Define a StreamWriter instance for a given file path
  10. Selectively Processing Part of Stream
  11. Using Streams to Read and Write Binary Data
  12. Using BinaryReader and BinaryWriter
  13. Checkpoint 10 - Define a FileStream instance using a static File method to read data
  14. Specifying Text Encodings
  15. Using Streams to Append Data
  16. Random FileStream Access
  17. MemoryStream Overview
  18. Asynchronous Streams
  19. Thread-safe File IO
  20. Summary
  21. Exercise 04 - Create a simple application to read binary data one byte at a time using a stream
Reading and Writing CSV Data
  1. Introduction
  2. An Overview of the CsvHelper Library
  3. Reading CSV Data Dynamically
  4. Checkpoint 11 - Define a CsvConfiguration that uses an invariant culture
  5. Checkpoint 12 - Use CsvHelper to read all the records in a CSV file as dynamic data
  6. Configuring CSV Comment Reading
  7. Configuring Trimming of Whitespace
  8. Configuring CSV Blank Line Handling
  9. Configuring CSV File Headers
  10. Configuring a Custom Delimiter
  11. Checkpoint 13 - Configure CsvHelper to use a semicolon instead of a comma
  12. Reading CSV Data in a Strongly Typed Way
  13. Configuring Custom Class Mapping
  14. Creating Custom Type Converters
  15. Configuring Header Validation and Missing Field Actions
  16. Writing CSV Files
  17. Summary
  18. Exercise 05 - Create Strongly typed Classes
Creating Automated Tests for File Access Code
  1. Introduction
  2. The Problems with Testing File Access Code
  3. An Overview of System.lO.Abstractions
  4. Refactoring for Testability
  5. Adding a TextFileProcessor Test
  6. Checkpoint 14 - Create a MockFileData instance containing 3 lines of text
  7. Adding a BinaryFileProcessor Test
  8. Checkpoint 15 - Add a file to a MockFileSystem instance
  9. Adding a CsvFileProcessor Test
  10. Checkpoint 16 - Add a directory to a MockFileSystem instance
  11. Checkpoint 17 - Read a file from a MockFileSystem instance
  12. Asserting Mock File Output with Approval Tests
  13. Summary, Resources, and Further Leaming
  14. Exercise 06 - Write a class that abstracts away the physical file system so that it can be unit tested

Comments

Popular posts from this blog

Angular Routing and Navigation Playbook

Mastering Git