Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor Tanya's Avatar
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430
    Hi

    i know that if file read in the middle position than give position in integer as a first argument

    file.Read(0,readBuf1);

    but if i like to want to start read file at the end of the file than what can i do??

    Regards,
    Tanya

  2. #2
    Registered User anglina's Avatar
    Join Date
    Dec 2006
    Location
    Noida, India
    Posts
    150
    use seek function to move cursor to end position by using ESeekEnd ..

  3. #3
    Registered User anglina's Avatar
    Join Date
    Dec 2006
    Location
    Noida, India
    Posts
    150
    there is one question in my mind.. if u start reading from end then you have nothing to read so why you want to start reading from end .. if u r trying to append some test in write mode then it's ok

  4. #4
    Nokia Developer Champion kiran10182's Avatar
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,240
    Hi,

    Refer to the Read() variants functions in the RFile Class in the SDK help.

    Kiran.

  5. #5
    Regular Contributor Tanya's Avatar
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430
    Sorry to all

    i done one mistake in query not At READ but at A WRITE time.

  6. #6
    Nokia Developer Champion kiran10182's Avatar
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,240
    Hi,

    Quote Originally Posted by Tanya
    Sorry to all

    i done one mistake in query not At READ but at A WRITE time.
    Following is a code snippet for it:
    Code:
    	_LIT(KWriteData,"TestData");
    	TBuf8<20> iData;
    	TInt iPos=0;
    	iData.Copy(KWriteData);
    	RFs iFs;
    	iFs.Connect();
    	RFile iFile;
    	TInt iErr=iFile.Open(iFs,KFileSpec,EFileWrite);
    	if(iErr==KErrNone)
    	{
    		iFile.Seek(ESeekEnd,iPos);
    		iFile.Write(iData);
    		iFile.Close();
    	}
    	iFs.Close();
    	//File closed
    Kiran.

Similar Threads

  1. Problem: 10 Bluetooth Ports simultaneously
    By Alco Fresh in forum Python
    Replies: 1
    Last Post: 2006-07-03, 12:05
  2. Exception: Expected start tag found end tag
    By jjefrey in forum OMA DM/DS/CP
    Replies: 8
    Last Post: 2006-03-31, 07:55
  3. Problem finding end of file. Please help.
    By permag in forum Symbian C++
    Replies: 2
    Last Post: 2005-07-12, 15:29
  4. Replies: 1
    Last Post: 2005-05-26, 14:22
  5. Reading A Text File Woes
    By _nomad_ in forum Symbian C++
    Replies: 1
    Last Post: 2005-02-02, 10:09

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved