how to copy file using EikFileUtils::CopyFile()

Login to reply to this topic.
Tue, 2005-03-15 05:36
Joined: 2005-01-08
Forum posts: 14
Hi all ,

I use class EikFileUtils to copy file . Because there is a static member CopyFile(const TDesC& aSourceFullName, const TDesC& aTargetFullName, TUint aSwitch); ,

The first time , it 's available , but then , after I added some data , it's not available any longer. So I try to retrive the case I didn't add some data . But it's still not available . Why ?  

Could you tell me how use CopyFile(const TDesC& aSourceFullName, const TDesC& aTargetFullName, TUint aSwitch); on earth ?

my source code as following :

=========================================

TUid  SaveImageType;
TUid  SaveImageSubType;
   
   // get encoder types from engine
   RImageTypeDescriptionArray imageTypes;
  iConverter->GetEncoderImageTypesL( imageTypes);   
   
   
  iConverter->iBitmap = iAppView->GetBitmapPointer();
   
   
    SaveImageType     = imageTypes[3]->ImageType();
    SaveImageSubType  = imageTypes[3]->SubType();
   
   
   
_LIT(KCTempimage,"C:\\nokia\\images\\tempImage.jpg");        TFileName tempFileName ;            
tempFileName.Format(KCTempimage);  

_LIT(KCSendimage,"C:\\nokia\\images\\MMSImage.jpg");  

TFileName sendFileName ;                      

sendFileName.Format(KCSendimage);    

iConverter->StartToEncodeL(tempFileName, SaveImageType, SaveImageSubType);
   
   
[color=red]EikFileUtils::CopyFile(tempFileName,  sendFileName);  
// but it didn't copy file to the specified path "C:\\nokia\\images\\MMSImage.jpg" Why =============================================[/color]

Wed, 2005-03-16 12:53
Forum Nokia Champion
Joined: 2003-10-01
Forum posts: 723
how to copy file using EikFileUtils::CopyFile()
Why don't you use RFs and RFile for file (system) operations?

tOtE

Gabor Torok
Software architect, Agil Eight (http://www.agileight.com/)
Blog: http://mobile-thoughts.blogspot.com/

  • Login to reply to this topic.