persistentstorage/store/TFILE/t_storfbuf.cpp
changeset 55 44f437012c90
parent 51 7d4490026038
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".
   618 	if(err == KErrNone)
   618 	if(err == KErrNone)
   619 		{
   619 		{
   620 		TEntry entry;
   620 		TEntry entry;
   621 		if(fsSession.Entry(aFullName, entry) == KErrNone)
   621 		if(fsSession.Entry(aFullName, entry) == KErrNone)
   622 			{
   622 			{
   623 			RDebug::Print(_L("Deleting \"%S\" file.\n"), &aFullName);
   623 			test.Printf(_L("Deleting \"%S\" file.\n"), &aFullName);
   624 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
   624 			err = fsSession.SetAtt(aFullName, 0, KEntryAttReadOnly);
   625 			if(err != KErrNone)
   625 			if(err != KErrNone)
   626 				{
   626 				{
   627 				RDebug::Print(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
   627 				test.Printf(_L("Error %d changing \"%S\" file attributes.\n"), err, &aFullName);
   628 				}
   628 				}
   629 			err = fsSession.Delete(aFullName);
   629 			err = fsSession.Delete(aFullName);
   630 			if(err != KErrNone)
   630 			if(err != KErrNone)
   631 				{
   631 				{
   632 				RDebug::Print(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
   632 				test.Printf(_L("Error %d deleting \"%S\" file.\n"), err, &aFullName);
   633 				}
   633 				}
   634 			}
   634 			}
   635 		fsSession.Close();
   635 		fsSession.Close();
   636 		}
   636 		}
   637 	else
   637 	else
   638 		{
   638 		{
   639 		RDebug::Print(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
   639 		test.Printf(_L("Error %d connecting file session. File: %S.\n"), err, &aFullName);
   640 		}
   640 		}
   641 	}
   641 	}
   642 
   642 
   643 //
   643 //
   644 // Test file-based stream buffer.
   644 // Test file-based stream buffer.