×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    How can start a reading file at the end of the position?

    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
    Join Date
    Dec 2006
    Location
    Noida, India
    Posts
    150

    Re: How can start a reading file at the end of the position?

    use seek function to move cursor to end position by using ESeekEnd ..

  3. #3
    Registered User
    Join Date
    Dec 2006
    Location
    Noida, India
    Posts
    150

    Re: How can start a reading file at the end of the position?

    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
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,344

    Re: How can start a reading file at the end of the position?

    Hi,

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

    Kiran.

  5. #5
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    Re: How can start a reading file at the end of the position?

    Sorry to all

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

  6. #6
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,344

    Smile Re: How can start a reading file at the end of the position?

    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 Symbian
    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
    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
    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
  •  
×