12 require_once(
"./Services/FileSystem/classes/class.ilFileDataImport.php");
36 define(
'MAIL_IMPORT_PATH',
'mail');
37 parent::__construct();
38 $this->mail_path = parent::getPath() .
"/" . MAIL_IMPORT_PATH;
68 if (isset($a_http_post_file) && $a_http_post_file[
'size']) {
73 ilUtil::moveUploadedFile(
74 $a_http_post_file[
'tmp_name'],
75 $a_http_post_file[
'name'],
76 $this->
getPath() .
'/' . $a_http_post_file[
'name']
89 $a_dir = $a_dir ? $a_dir : $this->
getPath();
93 foreach ($this->
getFiles() as $file_data) {
94 if (is_dir($file_data[
"abs_path"])) {
97 if (($tmp = explode(
".", $file_data[
"name"])) !==
false) {
98 if ($tmp[count($tmp) - 1] ==
"xml") {
99 return $this->xml_file = $file_data[
"abs_path"];
108 foreach ($this->
getFiles() as $file_data) {
128 foreach ($this->
getFiles() as $file_data) {
129 if (is_dir($file_data[
"abs_path"])) {
132 unlink($file_data[
"abs_path"]);
140 $a_dir = $a_dir ? $a_dir : $this->
getPath();
143 $dp = opendir($a_dir);
145 while (
$file = readdir($dp)) {
151 'abs_path' => $a_dir .
"/" .
$file,
152 'size' => filesize($a_dir .
"/" . $file),
153 'ctime' => filectime($a_dir .
'/' . $file)
169 if (is_writable($this->mail_path) && is_readable($this->mail_path)) {
172 $this->
ilias->raiseError(
"Mail import directory is not readable/writable by webserver", $this->
ilias->error_obj->FATAL);
184 if (!@file_exists($this->mail_path)) {
This class handles all operations on files for the exercise object.
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
__construct()
Constructor call base constructors checks if directory is writable and sets the optional obj_id...
_initDirectory()
init directory overwritten method public
getPath()
get exercise path public
__checkReadWrite()
check if directory is writable overwritten method from base class private
redirection script todo: (a better solution should control the processing via a xml file) ...
Create styles array
The data for the language used.
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
storeUploadedFile($a_http_post_file)
store uploaded file in filesystem
This class handles all operations on files for the exercise object.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively