RFs aFs;
User::LeaveIfError(aFs.Connect());
CleanupClosePushL(aFs);
path.Append(_L("Pixshare\\"));
aFs.MkDir(path);
path.Append(_L("camera.log"));
RFile myFile;
TInt error = aFs.Connect();
TInt err = myFile.Open(aFs, path, EFileShareExclusive | EFileWrite);
if (err == KErrNotFound) {
// Create file and write
err = myFile.Create(aFs, path, EFileStreamText | EFileWrite | EFileShareAny);
myFile.Write(0, _L8("file:///root1/Data/Images/2011/17/06/20111706.jpg\r\n"));
} else {
// Append
TInt pos = 0;
err = myFile.Seek(ESeekEnd, pos);
if (err == KErrNone)
{
TBuf8 des;
des.Copy(fileName);
des.Append(_L8("0,0,null,102334,null,null"));
myFile.Write(pos, des);
}
}
myFile.Close();
aFs.Close();
CleanupStack::PopAndDestroy(&aFs);
Title:
Symbian C++ - Write to file
Description:
RFs aFs; User::LeaveIfError(aFs.Connect()); CleanupClosePushL(aFs); path.Append(_L("Pixshare\\")); aFs.MkDir(path); path.App...
...
Rating:
4