How to append data to file in Symbian c++

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Created: vasant21 (03 Jan 2008)
Last edited: hamishwillee (26 Jul 2012)

This example shows appending data to some existing file.

_LIT8(KData,"This is an example data");
RFs fsSession;
User::LeaveIfError( fsSession.Connect() );
RFile file;
TInt err = file.Open(fsSession, KFileName, EFileWrite );
if(err == KErrNone) {
// File opened successfully now append data to file
// Find the end of the file
TInt pos = 0;
err = file.Seek( ESeekEnd, pos );
if( err == KErrNone ) {
file.Write(pos, KData);

This page was last modified on 26 July 2012, at 06:10.
38 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.