TextStream Object
The TextStream object facilitates sequential access to file.
Methods
Closes an open TextStream file. | |
Reads a specified number of characters. | |
Reads an entire TextStream. | |
Reads an entire line. | |
Skips a specified number of characters. | |
Skips the next line. | |
Writes a specified string. | |
Writes a specified number of newline characters. | |
Writes a specified string and newline character. |
Properties
True if the file pointer is before the end-of-line marker. | |
True if the file pointer is as the end of a file. | |
The column number of the current character position. | |
The current line number. |
Syntax
TextStream.{property | method( )}
Arguments
The property and method arguments can be any of the properties and methods associated with the TextStream object. Note that in actual usage TextStream is replaced by a variable placeholder representing the TextStream object returned from the FileSystemObject.
Remarks
In the following code, a is the TextStream object returned by the CreateTextFile method on the FileSystemObject:
var fs = new ActiveXObject("Scripting.FileSystemObject")
var a = fs.CreateTextFile("c:\\testfile.txt", true)
a.WriteLine("This is a test.")
a.Close
WriteLine and Close are two methods of the TextStream object.
Copyright © 2000 Chili!Soft