49 $rbacsystem = $DIC[
'rbacsystem'];
56 $upload_dir =
$lm_set->get(
"cont_upload_dir");
58 $web_directory = $DIC->filesystem()->storage();
65 return $scorm_import_directory->getAbsolutePath();
76 if (!$upload_dir = self::_getUploadDirectory()) {
81 $handle = opendir($upload_dir);
83 while (
false !== ($file = readdir($handle))) {
84 $full_path = $upload_dir .
"/" . $file;
85 if (is_file($full_path) and is_readable($full_path)) {
105 $files = self::_getUploadFiles();
107 return in_array($a_file, $files);
122 $ilias = $DIC[
'ilias'];
124 $file = self::_getUploadDirectory() .
"/" . $a_file;
127 if (!is_file($file)) {
128 if ($a_raise_errors) {
129 $ilias->raiseError(
$lng->txt(
"upload_error_file_not_found"), $ilias->error_obj->MESSAGE);
139 if ($a_raise_errors) {
141 $lng->txt(
"file_is_infected") .
"<br />" .
143 $ilias->error_obj->MESSAGE
154 return copy($file, $a_target);
static virusHandling($a_file, $a_orig_name="", $a_clean=true)
scan file for viruses and clean files if possible
static _getUploadDirectory()
Get the directory with uploaded files.
static _getUploadFiles()
Get a list of readable files in the upload directory.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static _checkUploadFile($a_file)
Check if a file exists in the upload directory and is readable.
static _copyUploadFile($a_file, $a_target, $a_raise_errors=true)
copy an uploaded file to the target directory (including virus check)