18.4. Classes File and Directory
Information is stored in files, which are organized in directories. Classes File and Directory enable programs to manipulate files and directories on disk. Class File can determine information about files and can be used to open files for reading or writing. We discuss techniques for writing to and reading from files in subsequent sections.
Figure 18.3 lists several of class File’s Shared methods for manipulating and determining information about files. We demonstrate several of these methods in Fig. 18.5.
File class Shared methods and descriptions | |
---|---|
AppendText | Returns a StreamWriter that appends text to an existing file or creates a file if one does not exist. ... |
Get Visual Basic 2005 for Programmers: Deitel Developer Series, Second Edition 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.