The File System

This section covers the classes that provide access to the file system. Creating, copying, and deleting files and directories are handled in Java by the java.io.File class. A slightly different approach is taken by .NET, but the end result is much the same. We end this section with a comparison of the Java and .NET file system methods.

Paths

The System.IO.Path class contains a series of static utility methods used to manipulate strings representing file and directory paths. With the exception of the GetTempFileName method, the Path class does not interact with the file system.

Although the Path class provides little functionality that can’t be achieved using string parsing and regular expressions, it is designed to provide cross-platform ...

Get C# for Java Developers 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.