Quintiq file version 2.0 
 | 
#parent: #root 
 | 
StaticMethod CopyFile ( 
 | 
  String source, 
 | 
  String destination, 
 | 
  output String feedback_o 
 | 
) as Boolean 
 | 
{ 
 | 
  Description: 'Copy file from one location to another location' 
 | 
  TextBody: 
 | 
  [* 
 | 
    // kin loong Jul-11-2013 (created) 
 | 
    value := false; 
 | 
    destinationdirectory := OS::GetFullDirectoryName( destination ); 
 | 
    isfileexist := OS::IsFile( source ); 
 | 
    isdirectoryexist := OS::IsDirectory( destinationdirectory ); 
 | 
     
 | 
    feedback_o := ''; 
 | 
    if( not isfileexist ) 
 | 
    { 
 | 
      feedback_o := Translations::MP_CopyFile_FileDoesNotExist() + ': ' + source; 
 | 
    } 
 | 
    else if( not isdirectoryexist ) 
 | 
    { 
 | 
      feedback_o := Translations::MP_CopyFile_DirectoryDoesNotExist() + ': ' + destinationdirectory; 
 | 
    } 
 | 
    else 
 | 
    { 
 | 
      OS::CopyFile( source, destination ); 
 | 
      value := true; 
 | 
    } 
 | 
    return value; 
 | 
  *] 
 | 
} 
 |