persistentstorage/dbms/tdbms/t_dbalter.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".
   645 	if(err == KErrNone)
   645 	if(err == KErrNone)
   646 		{
   646 		{
   647 		TEntry entry;
   647 		TEntry entry;
   648 		if(fsSession.Entry(aFullName, entry) == KErrNone)
   648 		if(fsSession.Entry(aFullName, entry) == KErrNone)
   649 			{
   649 			{
   650 			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
   650 			test.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
   651 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
   651 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
   652 			if(err != KErrNone)
   652 			if(err != KErrNone)
   653 				{
   653 				{
   654 				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
   654 				test.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
   655 				}
   655 				}
   656 			err = fsSession.Delete(aFullName);
   656 			err = fsSession.Delete(aFullName);
   657 			if(err != KErrNone)
   657 			if(err != KErrNone)
   658 				{
   658 				{
   659 				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
   659 				test.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
   660 				}
   660 				}
   661 			}
   661 			}
   662 		fsSession.Close();
   662 		fsSession.Close();
   663 		}
   663 		}
   664 	else
   664 	else
   665 		{
   665 		{
   666 		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
   666 		test.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
   667 		}
   667 		}
   668 	}
   668 	}
   669 
   669 
   670 //
   670 //
   671 // Test streaming conversions.
   671 // Test streaming conversions.