12 require_once(
"./Services/FileSystem/classes/class.ilFileDataImport.php");
36 define(
'GROUP_IMPORT_PATH',
'group');
48 return $this->files ? $this->files : array();
58 return $this->object_file;
73 if(isset($a_http_post_file) && $a_http_post_file[
'size'])
79 $a_http_post_file[
'name'], $this->
getPath().
'/'.$a_http_post_file[
'name']);
95 $a_dir = $a_dir ? $a_dir : $this->
getPath();
99 foreach($this->
getFiles() as $file_data)
101 if(is_dir($file_data[
"abs_path"]))
105 if(($tmp = explode(
".",$file_data[
"name"])) !==
false)
107 if($tmp[count($tmp) - 1] ==
"xml")
109 return $this->xml_file = $file_data[
"abs_path"];
118 $a_dir = $a_dir ? $a_dir : $this->
getPath();
122 foreach($this->
getFiles() as $file_data)
124 if(is_dir($file_data[
"abs_path"]))
128 if($file_data[
"name"] == $a_file)
130 return $this->object_file = $file_data[
"abs_path"];
133 return $this->object_file;
140 foreach($this->
getFiles() as $file_data)
161 foreach($this->
getFiles() as $file_data)
163 if(is_dir($file_data[
"abs_path"]))
169 unlink($file_data[
"abs_path"]);
177 $a_dir = $a_dir ? $a_dir : $this->
getPath();
179 $this->files = array();
180 $dp = opendir($a_dir);
182 while(
$file = readdir($dp))
188 $this->files[] = array(
190 'abs_path' => $a_dir.
"/".
$file,
191 'size' => filesize($a_dir.
"/".
$file),
207 if(is_writable($this->group_path) && is_readable($this->group_path))
213 $this->ilias->raiseError(
"Group import directory is not readable/writable by webserver",$this->ilias->error_obj->FATAL);
225 if(!@file_exists($this->group_path))