C# C# Streams and Data Processing Reading Data Reading a CSV File

Chance Crawford
Chance Crawford
4,679 Points

What is the point of having the DirectoryInfo object at this point?

DirectoryInfo directory = new DirectoryInfo(currentDirectory);

As I can tell this object has really done nothing this whole course. Instead of having to insert directory.FullName in the next line.

var fileName = Path.Combine(directory.FullName, "SoccerGameResults.csv");

We could have just put currentDirectory in its place instead. So what is the point of the DirectoryInfo object, or the FileInfo object? and why do we need it here?