4.2. Working with the file system
The System.IO namespace contains several classes used to work with the file system. The FileSystemInfo class serves as a base class for the FileInfo and DirectoryInfo classes. There is also a File class that allows us to work with files and a Directory class for directory manipulations. Figure 4.7 shows these classes.
Figure 4.7. The File and Directory classes
Note the difference between the classes mentioned above. The FileInfo class provides instance methods for the creation, copying, deletion, moving, and opening of files – it aids in the creation of FileStream objects. The File class provides static methods ...