Manipulating Directories and Pathnames

The .NET Framework makes it easier to work with directories and pathnames, providing the System.IO.Directory and System.IO.Path classes. Such classes offer shared methods for accessing directories and directory names, allowing deep manipulation of folders and names. To be honest, System.IO.Path also provides members for working against filenames, and due to its nature it is included in this section. There are also situations in which you need to work against single directories as instances of .NET objects, and this is where the System.IO.DirectoryInfo class comes in. In this section you learn to get the most from such classes for directory manipulation.

Tip

All code examples provided in this chapter require ...

Get Visual Basic® 2010 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.