The System.IO.DirectoryInfo Class

The System.IO.DirectoryInfo class represents a single directory. More precisely, an instance of the DirectoryInfo class handles information about the specified directory. It inherits from System.IO.FileSystemInfo, which is a base class that provides the basic infrastructure for representing directories or files. You create an instance of the DirectoryInfo class by passing the desired directory name as an argument to the constructor:

Dim di As New DirectoryInfo("C:\Demo")

You have the same members that you already learned about for the Directory class, with some differences. First, now members are instance members and not shared. Second, methods summarized in Table 18.1 are now properties. ...

Get Visual Basic 2015 Unleashed 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.