| Class TextFile (unit ODFileUnit) |
TObject
The TextFile class implements access to files consisting of lines of text. Text files do not support seeking, and have limited open and sharing modes (see above).
| Constructors |
constructor Create;------------------------------------------------------------------------------ TextFile methods.
| Functions |
procedure Close;
destructor Destroy;
function FileName : string;Get file name (may be empty
function IsOpen : boolean;
procedure Open( const fname : string;
omode : TextFileOpenMode;
smode : TextFileShareMode );Once again, open is mostly about mapping modes
function ReadLine( var line : string ) : boolean;
procedure WriteLine( const line : string );write line to text file, terminating with CR/LF pair
| Properties |
| Events |
| Variables |
mBuffer : TFBuffer;
mFile : RawFile;| Constructors |
constructor Create;text file buffer
------------------------------------------------------------------------------ TextFile methods. Most work is done by the RawFile and TFBuffer classes. ------------------------------------------------------------------------------ Constructor creates the rawfile & buffer object
| Functions |
procedure Close;Close file. Always safe to call, even on already closed files.
Close file
destructor Destroy;destroy rawfile & buffer
function FileName : string;accessors for RawFile properties
Get file name (may be empty
function IsOpen : boolean;Get open state
procedure Open( const fname : string;
omode : TextFileOpenMode;
smode : TextFileShareMode );Open a text file
Once again, open is mostly about mapping modes
function ReadLine( var line : string ) : boolean;Read a line from file, stripping CR/LF pair. Returns False if at end of file.
Read line, trimming CR/LF.
procedure WriteLine( const line : string );Write a line of text to file & terminate with CR/LF pair
write line to text file, terminating with CR/LF pair
| Properties |
| Events |
| Variables |
mBuffer : TFBuffer;implemented via RawFile
mFile : RawFile;