TFileText Class Reference
Reads and writes single lines of text to or from a Unicode file.
Constructor & Destructor Documentation
Member Functions Documentation
CheckForTerminator(TBool &)
TInt
|
CheckForTerminator
|
(
|
TBool
&
|
anAnswer
|
)
|
[private]
|
FillBuffer()
TInt
|
FillBuffer
|
(
|
)
|
[private]
|
NextRecord()
void
|
NextRecord
|
(
|
)
|
[private]
|
Read(TDes &)
Reads single line text record from a Unicode file into the specified descriptor.
The read operation begins at the current file position, and ends when a line delimiter character is read.
If the maximum length of the descriptor is insufficient to hold the record, the function returns KErrTooBig and the descriptor is filled to its maximum length.
If
Read()
is called when the current position is the end of the file (that is, after the last line delimiter in the file), KErrEof is returned, and the length of the buffer is set to zero.
Parameters
TDes
& aDes
|
On return, contains the single record read from the file. Any previous contents are overwritten.
|
Seek(TSeek)
Seeks to start or end of file.
It is only necessary to call this function before using
Read()
because
Write()
always seeks to the end of the file before writing.
Parameters
TSeek
aMode
|
ESeekStart to seek to the start of the file; ESeekEnd to seek to the end.
|
Set(RFile &)
IMPORT_C void
|
Set
|
(
|
RFile
&
|
aFile
|
)
|
|
Parameters
RFile
& aFile
|
The file to be used. Must be open.
|
Write(const TDesC &)
Writes the contents of a descriptor to the end of a Unicode file.
A line delimiter is appended to the descriptor, and the current file position is set to the new end of file.
If the descriptor contains one or more paragraph delimiters,
Read()
will treat the contents of the descriptor as more than one record.
TFileText::Read
Parameters
const
TDesC
& aDes
|
The descriptor content to be appended to the file.
|
Member Enumerations Documentation
Enum TFileState
Enumerators
EStartOfFile
|
|
ENormal
|
|
EReverse
|
|
Member Data Documentation
const TText * iEnd
const
TText
*
|
iEnd
|
[private]
|
const TText * iNext
const
TText
*
|
iNext
|
[private]
|
TBuf8< 0x100 > iReadBuf
TBuf8
< 0x100 >
|
iReadBuf
|
[private]
|
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.