Hi everybody!
I want to write the content of a class TSettings in a file Rfile and then read it.
I write it but I don't know how can I make to read it after.
thanks for your help!

Code:
//.h
class TSettings
{
public:
	TBool useContacts;
	TBool useApplications;
	TBool useBookmarks;
	TBool useMultimedia;
	TInt resfreshFrequency;
};

class CSettings
{
public:
	void constructL();
	CSettings();
	~CSettings();
	void openFileWriteStream();
	void closeFileWriteStream();
	void ExternalizeL(RWriteStream& aStream) const;

	RFile file;
	RFs	m_pFsSession;
	TSettings settings;
};

//.cpp

void CSettings::constructL()
{
	settings.useContacts = true;
	settings.useApplications = true;
	settings.useBookmarks = true;
	settings.useMultimedia = true;
	settings.resfreshFrequency = 4;

	openFileWriteStream();
}

void CSettings::openFileWriteStream()
{
	CfinditAppUi* appUi = static_cast<CfinditAppUi*>(CEikonEnv::Static()->EikAppUi());
	User::LeaveIfError(m_pFsSession.Connect()); 


	TParsePtr	parser(CEikonEnv::Static()->EikAppUi()->Application()->AppFullName());
	TFileName fileName;
	#ifdef __WINS__
	fileName = _L("c:\\system\\apps\\mobifindit\\");
	#else
	fileName.Append(parser.DriveAndPath());
	#endif
	fileName.Append(_L("settings.txt"));

	TPckg<TSettings> dataBuf(settings);

	TInt err=file.Replace(m_pFsSession, fileName, EFileWrite | EFileStream);

	switch(err)
	{
	case KErrNone:
		{
		// successfully opened file
		}
		break;
	case KErrPathNotFound:
		{
		appUi->SetTitlePaneText(_L("Incorrect path"));
		err = m_pFsSession.MkDirAll(fileName);
		User::LeaveIfError(err);
		}
		break;
	default:
		// Most be an error or some kind
		appUi->SetTitlePaneText(_L("Other error"));
		User::Leave(err);
		break;
	}
	
	CleanupClosePushL(file);
	file.Write(dataBuf);
}