O'Reilly logo

A Programmer's Guide to .NET by Alexei Fedorov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required