×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Super Contributor
    Join Date
    Oct 2005
    Location
    Hyderabad,India
    Posts
    1,156

    Exclamation Writing a File.Pls Help

    Hello,
    I have created the file.but the problem is that i am not able to write any thing to it.I am also attaching the codes with this.Pls Help me to sort this out.
    Codes::

    TBuf<KExQueryTextBufLength> textToGet;
    RFs rfs;
    User::LeaveIfError(rfs.Connect());
    CleanupClosePushL(rfs);
    rfs.MkDir(KFileDir);
    RFile file;
    if(file.Open(rfs,KFilePath,EFileWrite)!=KErrNone)
    {
    HBufC* text1 = StringLoader::LoadLC(R_FILE_ERROR);
    HBufC* text2 = StringLoader::LoadLC(R_FILE_FAILED_TO_CREATE );
    CCknInfoDialog::RunDlgLD(*text1,*text2);
    CleanupStack::PopAndDestroy(text2);
    CleanupStack::PopAndDestroy(text1);
    CleanupStack::PopAndDestroy();
    return;
    }
    CleanupClosePushL(file);

    RFileWriteStream writer(file);

    CleanupClosePushL(writer);

    writer.WriteL(textToGet);
    writer.CommitL();
    writer.Close();

    I am able to create the file.but the problem is that i am not able to write anything in it.
    Pls help me to sort this out.
    Thaks in advance
    Cheers
    Priju

  2. #2
    Super Contributor
    Join Date
    Oct 2005
    Location
    Hyderabad,India
    Posts
    1,156

    Re: Writing a File.Pls Help

    Can any one pls help me out.I know there are persons who have worked in this stuff..Plsssss i badly need to sort it out.
    Cheers
    Priju

Similar Threads

  1. URGENT .. writing a recognizer
    By Devang Shah in forum Symbian
    Replies: 0
    Last Post: 2005-06-15, 18:53
  2. File Writing Problem
    By _nomad_ in forum Symbian
    Replies: 2
    Last Post: 2005-04-19, 10:29
  3. Nokia Digital Pen SU-1B Writing Smudge
    By pramod.sharma in forum General Messaging
    Replies: 0
    Last Post: 2004-10-23, 15:23
  4. writing a TBuf to a file
    By mwilliams45 in forum Symbian
    Replies: 3
    Last Post: 2003-04-11, 08:46
  5. Replies: 2
    Last Post: 2002-10-24, 04:23

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×