Section 7.4. The System.IO Namespace


7.4. The System.IO Namespace

The classes in the System.IO namespace provide a variety of input/output functionality, such as:

  • Manipulating directories (Directory class) and files (File class)

  • Monitoring changes in directories and files (FileSystemWatcher class)

  • Reading and writing single bytes, multibyte blocks, or characters to and from streams

  • Reading and writing characters to and from strings (StringReader and StringWriter)

  • Reading and writing data types and objects to and from streams (BinaryWriter and BinaryReader)

  • Providing random access to files (FileStream)

The System.IO namespace replaces the functionality found in the COM-based FileSystemObject component, a tool commonly used in VBA-based scripting (and part of the Microsoft Scripting Runtime). Chapter 12 includes entries related to the File and Directory classes of the System.IO namespace.

New in 2005. With the addition of the My Namespace feature, Visual Basic programmers have one more convenient place to accomplish file system-specific tasks. The My.Computer.FileSystem object includes many of the most commonly used file system features. See the FileSystem Object entry in Chapter 13 for additional usage information.




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net