Show/Hide Toolbars

RiverSoftAVG Products Help

Navigation: Code Documentation > RSCommon > GStreams > Classes > TGTextStream > Constructors

TGTextStream.Create(String,Word,TEncoding) Constructor

Scroll Prev Top Next More

The constructor creates and allocates the memory for the text stream. This constructors also creates and manages a TFileStream object for reading or writing to the specified file. The Mode parameter indicates how the file is to be opened. The Mode parameter consists of an open mode and a share mode or'ed together. The open mode must be one of the following values:
 

fmCreate

Create a file with the given name. If a file with the given name exists, open the file in write mode.
 

fmOpenRead

Open the file for reading only.

fmOpenWrite

Open the file for writing only. Writing to the file completely replaces the current contents.

fmOpenReadWrite

Open the file to modify the current contents rather than replace them.
 

The share mode must be one of the following values:

fmShareCompat

Sharing is compatible with the way FCBs are opened.

fmShareExclusive

Other applications can not open the file for any reason.

fmShareDenyWrite

Other applications can open the file for reading but not for writing.

fmShareDenyRead

Other applications can open the file for writing but not for reading.

fmShareDenyNone

No attempt is made to prevent other applications from reading from or writing to the file.
 

If the file can not be opened, Create raises an exception.
 

Namespace: GStreams

Parameters

Filename

Type: String

Mode

Type: Word

Encoding

Type: TEncoding

RiverSoftAVG Products Help © 1996-2016 Thomas G. Grubb