Wednesday, March 11, 2009

Files In Symbian

TInt err;
RFs fs;

TBuf8<50> buf;
TBuf16<50> buf16;

RFile file;
err = fs.Connect();
if (err)
RDebug::Printf("File Session Connect error\n");
err = file.Create(fs, _L("C:\\stalin.txt"), EFileWrite);
if (err == KErrAlreadyExists err == KErrNone)
{
file.Open(fs, _L("C:\\stalin.txt"), EFileWrite);
err = file.Write(_L8("Cherry India Solutions Pvt Ltd"));
file.Close();

file.Open(fs, _L("C:\\stalin.txt"), EFileRead);
file.Read(buf);
buf16.Copy(buf);
file.Close();
CAknInformationNote *note = new (ELeave) CAknInformationNote;
note->ExecuteLD(buf16);

}
fs.Close();

No comments: