lowlevellibsandfws/pluginfw/Framework/EcomTestUtils/t_processfilemanrename.cpp
changeset 44 97b0fb8a2cc2
parent 0 e4d67989cc36
child 57 2efc27d87e1c
equal deleted inserted replaced
22:ddc455616bd6 44:97b0fb8a2cc2
    22 
    22 
    23 _LIT(KSeparator, "|"); // Invalid filepath char used to separate filenames
    23 _LIT(KSeparator, "|"); // Invalid filepath char used to separate filenames
    24 
    24 
    25 TInt DoRenameFileL(const TDesC& anOld,const TDesC& aNew)
    25 TInt DoRenameFileL(const TDesC& anOld,const TDesC& aNew)
    26 	{
    26 	{
       
    27 	TInt r = KErrNone;	
    27 	RFs fs;
    28 	RFs fs;
    28 	fs.Connect();
    29 	r = fs.Connect();
       
    30 	if (r != KErrNone)
       
    31 		{
       
    32 			User::Leave(r);
       
    33 		}
    29 	CFileMan* fileMan = CFileMan::NewL(fs);
    34 	CFileMan* fileMan = CFileMan::NewL(fs);
    30 	CleanupStack::PushL(fileMan); 
    35 	CleanupStack::PushL(fileMan); 
    31 	// Ensure the path exists
    36 	// Ensure the path exists
    32 	TInt err = fs.MkDirAll(aNew);	
    37 	TInt err = fs.MkDirAll(aNew);	
    33 	// Make the destination file writeable 
    38 	// Make the destination file writeable