public static function copyToPublic($uid)
 {
     $fileObject = Utility::uid2file($uid);
     $nameWithout = $fileObject->getNameWithoutExtension();
     $ext = $fileObject->getExtension();
     $temp = Utility::createPublicTempFile($nameWithout, '.' . $ext);
     file_put_contents($temp['name'], $fileObject->getContents());
     return $temp;
 }
 /**
  * Build zip for current folder
  * only supporting fileadmin for now
  * @return void
  */
 private function createZipArchiveForCurrentFolder()
 {
     $temp = Utility::createPublicTempFile($this->folderObject->getName(), '.zip');
     $zip = new ZipArchive();
     $zip->open($temp['name'], ZipArchive::CREATE);
     $this->addToZip($this->folderObject, $zip);
     $zip->close();
     return $temp;
 }