Symbian 实现文件操作
2010-04-20 15:58:00 来源:WEB开发网核心提示:{iFile.Create(iFs, aName, aFileMode);}}CMyFileOperate::~CMyFileOperate(){iFile.Close();iFs.Close();}CMyFileOperate::CMyFileOperate(){}TInt CMyFileOperate::Read(
{
iFile.Create(iFs, aName, aFileMode);
}
}
CMyFileOperate::~CMyFileOperate()
{
iFile.Close();
iFs.Close();
}
CMyFileOperate::CMyFileOperate()
{
}
TInt CMyFileOperate::Read(TDes8 &aDes, TInt aLength)
{
return iFile.Read(aDes, aLength);
}
TInt CMyFileOperate::Seek(TSeek aMode, const TInt &aPos)
{
TInt pos = aPos;
return iFile.Seek(aMode, pos);
}
TInt CMyFileOperate::Write(const TDesC8 &aDes)
{
return iFile.Write(aDes);
}
TInt CMyFileOperate::Write(const TDesC8 &aDes, TInt aLength)
{
return iFile.Write(aDes, aLength);
}
TInt CMyFileOperate::Size()
{
TInt size = 0;
if (KErrNone == iFile.Size(size))
{
return size;
}
return -1;
}
TInt CMyFileOperate::CleanContent()
{
return iFile.SetSize(0);
}
/////////////////////////////////////////////////////////
更多精彩
赞助商链接