Documentation
copy
usage
boolean success = file->copy( file destination )
paramètres
destination: a file object representing the location of the copy. It doesn't have to exist yet (but it may exist).
retourne
whether the operation was successfull or not
exemples
include_once('../Kernel/common/file.class.php');
$origin = new File('/media/8217.txt');
$destination = new File('/media/8217-bak.txt');
// giving an object
$origin->copy($destination);
$origin = new File('/media/picture.jpg');
// giving the path of the destination
$origin->copy('/media/picture2.jpg');
// copying to temporary file
$tmpfile = new TempFile();
$origin->copy($tmpfile);
$tmpfile->forceDownload();