12 require_once(
"./classes/class.ilFileDataImport.php");
36 define(
'MAIL_IMPORT_PATH',
'mail');
48 return $this->files ? $this->files : array();
68 if(isset($a_http_post_file) && $a_http_post_file[
'size'])
75 $this->
getPath().
'/'.$a_http_post_file[
'name']);
89 $a_dir = $a_dir ? $a_dir : $this->
getPath();
93 foreach($this->
getFiles() as $file_data)
95 if(is_dir($file_data[
"abs_path"]))
99 if(($tmp = explode(
".",$file_data[
"name"])) !==
false)
101 if($tmp[count($tmp) - 1] ==
"xml")
103 return $this->xml_file = $file_data[
"abs_path"];
112 foreach($this->
getFiles() as $file_data)
133 foreach($this->
getFiles() as $file_data)
135 if(is_dir($file_data[
"abs_path"]))
141 unlink($file_data[
"abs_path"]);
149 $a_dir = $a_dir ? $a_dir : $this->
getPath();
151 $this->files = array();
152 $dp = opendir($a_dir);
154 while(
$file = readdir($dp))
160 $this->files[] = array(
162 'abs_path' => $a_dir.
"/".
$file,
163 'size' => filesize($a_dir.
"/".
$file),
179 if(is_writable($this->mail_path) && is_readable($this->mail_path))
185 $this->ilias->raiseError(
"Mail import directory is not readable/writable by webserver",$this->ilias->error_obj->FATAL);
197 if(!@file_exists($this->mail_path))