Previous PageNext Page

7.25 TextStream Object

The TextStream object facilitates sequential access to file.
 

Methods

TextStream Close
 
Closes an open TextStream file.
 
TextStream Read
 
Reads a specified number of characters.
 
ReadAll
 
Reads an entire TextStream.
 
ReadLine
 
Reads an entire line.
 
Skip
 
Skips a specified number of characters.
 
SkipLine
 
Skips the next line.
 
Write
 
Writes a specified string.
 
WriteBlankLines
 
Writes a specified number of newline characters.
 
WriteLine
 
Writes a specified string and newline character.
 

Properties

AtEndOfLine
 
True if the file pointer is before the end-of-line marker.
 
AtEndOfStream
 
True if the file pointer is as the end of a file.
 
Column
 
The column number of the current character position.
 
Line
 
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

Previous PageTop Of PageNext Page