Appendix U. File-System Classes
A Visual Basic application can take three basic approaches to file system manipulation: Visual Basic methods, System.IO Framework classes, and the My.Computer.FileSystem namespace. This appendix summaries the properties, methods, and events provided by these approaches.
Visual Basic Methods
The following table summarizes the Visual Basic methods for working with files. They let a program create, open, read, write, and learn about files.
Method | Purpose |
---|---|
| Returns |
| Closes an open file. |
| Reads data from a file opened in |
| Reads data as an object from a file opened in |
| Opens a file for reading or writing. Parameters indicate the mode ( |
| Writes data from a variable into a file opened for |
| Writes an object from a variable into a file opened for |
| Returns a file number that is not currently associated with any file in this application. You should use |
| Reads data written into a file by the |
| Reads a specific number of characters from the file. |
| Returns the next line of text from ... |
Get Visual Basic® 2008 Programmer's Reference 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.