Directories and Files

Our next topic, directories and files, is not particularly advanced but is quite fundamental. In this section we will first examine the System.IO.Directory class in the .NET Framework that allows us to work with directories. We will then look at file input and output, which makes use of an intermediary called a stream.

Directories

The classes supporting input and output are in the namespace System.IO. The classes Directory and DirectoryInfo contain routines for working with directories. All the methods of Directory are static, and so you can call them without having a directory instance. The DirectoryInfo class contains instance methods. In many cases, you can accomplish the same objective using methods of either class. ...

Get Programming PERL in the .NET Environment now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.