Files and Directories
The base class library (BCL) contains classes for working with files and directories: File, FileInfo, DirectoryInfo, and DirectoryInfoInfo. What's nice about these classes is that they provide a simplified, high-level interface for working with files and directories. Anyone who has had to perform low-level operating system file system manipulation in the past is likely to appreciate the ease of use that comes with using these classes. Anything that can be done to a file or DirectoryInfo can be performed with the File and DirectoryInfo classes, including viewing attributes, creation, modification, and deletion operations.
Table 17.1 shows some of the File and DirectoryInfo classes available. Notice the convention where
Get C# 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.