19 declare(strict_types=1);
34 private readonly \ILIAS\Filesystem\Util\Archive\Archives
$archives;
35 private readonly \ILIAS\FileDelivery\Services
$delivery;
40 $this->image_converter = $DIC->fileConverters()->legacyImages();
41 $this->archives = $DIC->archives();
42 $this->delivery = $DIC->fileDelivery();
64 $this->image_converter->convertToFormat(
67 ImageOutputOptions::FORMAT_JPG,
68 $geometry ===
'' ?
null : (
int) $geometry,
69 $geometry ===
'' ?
null : (
int) $geometry,
81 public function zipAndDeliver(array $streams,
string $download_filename): void
83 $this->delivery->delivery()->attached(
84 $this->archives->zip($streams)->get(),
89 public function getDir(
string $copyDirectory): array
94 public function unzip(
string $file,
string $zip_output_path,
bool $overwrite):
Unzip 96 return $this->archives->unzip(
97 Streams::ofResource(fopen($file,
'rb')),
98 $this->archives->unzipOptions()
99 ->withOverwrite($overwrite)
100 ->withZipOutputPath($zip_output_path)
101 ->withDirectoryHandling(ZipDirectoryHandling::KEEP_STRUCTURE)
117 bool $raise_errors =
true,
118 string $mode =
'move_uploaded' 131 string $module_path =
"",
132 string $mode =
"output",
133 bool $offline =
false
convertImage(string $from, string $to, string $geometry='')
readonly ILIAS FileDelivery Services $delivery
zipAndDeliver(array $streams, string $download_filename)
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
prepareFormOutput(string $string)
stripSlashes(string $string)
static deliverData(string $a_data, string $a_filename, string $mime="application/octet-stream")
getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
moveUploadedFile(string $file, string $name, string $target, bool $raise_errors=true, string $mode='move_uploaded')
static delDir(string $a_dir, bool $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static getDir(string $a_dir, bool $a_rec=false, ?string $a_sub_dir="")
get directory
static moveUploadedFile(string $a_file, string $a_name, string $a_target, bool $a_raise_errors=true, string $a_mode="move_uploaded")
move uploaded file
deliverData(string $data, string $fileName, string $mimeType)
unzip(string $file, string $zip_output_path, bool $overwrite)
getDir(string $copyDirectory)
readonly ILIAS Filesystem Util Convert LegacyImages $image_converter
readonly ILIAS Filesystem Util Archive Archives $archives