Documentation
create
usage
tmpdirectory->create()
exemples
// create a temporary directory, copy files into it and proposes the download of an archive of these files to the user.
include_once("../Kernel/common/file.class.php");
$tmpdir = new TempDirectory();
$tmpdir->create();
$file = new File('/media/picture1.jpg');
$file2 = new File('/file/picture1.tiff');
$file->copy($tmpdir);
$file2->copy($tmpdir);
$archive = $tmpdir->compress();
$archive->forceDownload();