How can i.?(Please reply me)

Login to reply to this topic.
Thu, 2005-02-24 07:19
Joined: 2005-02-23
Forum posts: 4
Hi
How can i store the file on the seriese 60 mobile device.?
Please let me know as soon as possible
Thanx

jigneshKakkad


Thu, 2005-02-24 10:42
Joined: 2004-11-20
Forum posts: 67
How can i.?(Please reply me)
Write To File:

You can search in forum,
But I use this code:


_LIT( KFileName, "C:\\System\\Apps\\test.txt");

void CMyApp::WriteToFile(TInt aIndex)
{
   RFile myFile;
   RFs mySession;
   
   mySession.Connect();
   User::LeaveIfError( myFile.Replace( mySession, KFileName,  
                          EFileWrite|EFileStreamText ) );
   //TDesC8::Copy(const TDesC16& aDes);
   HBufC8 *iMyBufNumber = HBufC8::NewLC(255);
   TPtr8 bufNumberPtr(iMyBufNumber->Des());
   bufNumberPtr.AppendNum(aIndex);
   
   myFile.Write(*iMyBufNumber);
   CleanupStack::PopAndDestroy();
   myFile.Close();
   mySession.Close();

}
  • Login to reply to this topic.