Symbian中如何读入一行文本的类TFileText--SDk
来源:互联网 发布:linux rename 文件夹 编辑:程序博客网 时间:2024/06/05 17:46
SYMBIAN OS V9.2
FEEDBACK
Location: f32file.h
Link against: efsrv.lib
Class TFileText
class TFileText;
Description
Reads and writes single lines of text to or from a file.
Members
Defined in TFileText
: Read()
, Seek()
, Set()
, TFileText()
, Write()
Construction and destruction
TFileText()
IMPORT_C TFileText();
Description
Default constructor.
Member functions
Set()
IMPORT_C void Set(RFile &aFile);
Description
Sets the file to be read from, or written to.
This function must be called before Read()
, Write()
or Seek()
can be used.
Parameters
RFile
&aFile
The file to be used. Must be open.
See also:
TFileText::Read
TFileText::Write
TFileText::Seek
Read()
IMPORT_C TInt Read(TDes &aDes);
Description
Reads single line text record into the specified descriptor.
The read operation begins at the current file position, and ends when a line delimiter character is read; a record has a maximum length of 256 characters.
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.
Return value
TInt
KErrNone if successful, otherwise one of the other system-wide error codes.
Write()
IMPORT_C TInt Write(const TDesC &aDes);
Description
Writes the contents of a descriptor to the end of a 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.
Parameters
const TDesC &aDes
The descriptor content to be appended to the file.
Return value
TInt
KErrNone if successful, otherwise one of the other system-wide error codes.
See also:
TFileText::Read
Seek()
IMPORT_C TInt Seek(TSeek aMode);
Description
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.
Return value
TInt
KErrNone if successful, otherwise one of the other system-wide error codes.
Panic codes
FSCLIENT
5 if aMode is neither ESeekStart nor ESeekEnd.
See also:
TFileText::Read
TFileText::Write
- Symbian中如何读入一行文本的类TFileText--SDk
- symbian os :TFileText 读写文本的实例
- C++中读入一行字符的操作
- C程序读入一组文本行,打印最长的一行。
- ZOJ-2812-Quicksum-getline读入一行文本
- C++中读入一行字符
- 读入一行字符串的方法
- 一行文本中括号的匹配情况
- 【C++】【格式】c++ 如何读入一行字符串
- 如何从Symbian数据库中读取长文本
- 将一个文本里的信息,读入到 list 中
- 统计读入文本中双字符出现的次数
- symbian 的c++ sdk
- symbian 的c++ sdk
- SYMBIAN SDK的认识
- 从cin读入一组词并把它们存入一个vector对象中去,如何把所有的词都改为大写形式,输出结果,每个词占一行。
- Python每次读入文件一行的问题
- 读入一行由空格隔开的数字
- 王者归来
- VS2003 Page_Load 事件 不触发,IE缓存惹的祸
- Asp.net 2.0 C#实现压缩/解压功能 (示例代码)
- 股市早8点
- X.509标准简介
- Symbian中如何读入一行文本的类TFileText--SDk
- 开篇语
- Asp.net 2.0 用C# 创建 PDF文件[引用] (示例代码下载)
- 股市早8点(10月15日周一)
- 用Debug函数实现API函数的跟踪
- 近日对用户界面类库有较大范围的改动
- CACert:免费的数字证书组织
- 今日午评:利空消息接踵而来 反应过度 两市跳水暴跌
- 网友四年来呕心沥血收集的武汉公交趣事