JFolder::create($targetpath);
JFolder::create($targetpath.DS.'tmpl');
$tfile=$targetpath.DS.'index.html';
JFile::copy($sfile,$tfile);
$files[]=$tfile;
文件拷贝
$data=JFile::read($sfile);
$tfile = $targetpath.'/helper.php';
JFile::write($tfile,$data);
$files[]=$tfile;
unset($data);