persistentstorage/store/TSTOR/t_storshape.cpp
changeset 55 44f437012c90
parent 0 08ec8eefde2f
equal deleted inserted replaced
51:7d4490026038 55:44f437012c90
     1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 1998-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
   239 	if(err == KErrNone)
   239 	if(err == KErrNone)
   240 		{
   240 		{
   241 		TEntry entry;
   241 		TEntry entry;
   242 		if(fsSession.Entry(aFullName, entry) == KErrNone)
   242 		if(fsSession.Entry(aFullName, entry) == KErrNone)
   243 			{
   243 			{
   244 			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
   244 			test.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
   245 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
   245 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
   246 			if(err != KErrNone)
   246 			if(err != KErrNone)
   247 				{
   247 				{
   248 				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
   248 				test.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
   249 				}
   249 				}
   250 			err = fsSession.Delete(aFullName);
   250 			err = fsSession.Delete(aFullName);
   251 			if(err != KErrNone)
   251 			if(err != KErrNone)
   252 				{
   252 				{
   253 				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
   253 				test.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
   254 				}
   254 				}
   255 			}
   255 			}
   256 		fsSession.Close();
   256 		fsSession.Close();
   257 		}
   257 		}
   258 	else
   258 	else
   259 		{
   259 		{
   260 		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
   260 		test.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
   261 		}
   261 		}
   262 	}
   262 	}
   263 
   263 
   264 //
   264 //
   265 // Test the streaming framework.
   265 // Test the streaming framework.