5 require_once
"Services/Object/classes/class.ilObject2.php";
26 $this->folder_tree =& $a_tree;
37 public function doCloneObject($a_new_object, $a_target_id, $a_copy_id = 0)
64 global $tree, $ilAccess;
66 $tmpdir = $tmpdir.DIRECTORY_SEPARATOR.ilUtil::getASCIIFilename(
$title);
69 $subtree = $tree->getChildsByTypeFilter($refid,
array(
"fold",
"file"));
71 foreach ($subtree as $child)
73 if (!$ilAccess->checkAccess(
"read",
"", $child[
"ref_id"]))
81 if ($child[
"type"] ==
"fold")
85 $newFilename = $tmpdir.DIRECTORY_SEPARATOR.ilUtil::getASCIIFilename($child[
"title"]);
88 if (!copy ($oldFilename, $newFilename))
90 throw new ilFileException(
"Could not copy ".$oldFilename.
" to ".$newFilename);
92 touch($newFilename, filectime($oldFilename));
102 include_once
'Modules/File/classes/class.ilObjFile.php';
103 include_once
'Modules/File/classes/class.ilFileException.php';
105 if (!$ilAccess->checkAccess(
"read",
"", $this->getRefId()))
107 include_once
"Services/Object/exceptions/class.ilObjectException.php";
112 include_once
"Services/Object/exceptions/class.ilObjectException.php";
119 $basename = ilUtil::getAsciiFilename($this->
getTitle());
120 $deliverFilename = $basename.
".zip";
121 $zipbasedir = $tmpdir.DIRECTORY_SEPARATOR.$basename;
122 $tmpzipfile = $tmpdir.DIRECTORY_SEPARATOR.$deliverFilename;
getViewMode()
Get container view mode.
Base exception class for object service.
static _isInTrash($a_ref_id)
checks wether object is in trash
doCloneObject($a_new_object, $a_target_id, $a_copy_id=0)
Clone folder.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static recurseFolder($refid, $title, $tmpdir)
private functions which iterates through all folders and files and create an according file structure...
static recurseFolder($refid, $title, $tmpdir)
private functions which iterates through all folders and files and create an according file structure...
Class to report exception.
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
static zip($a_dir, $a_file, $compress_content=false)
zips given directory/file into given zip.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 ...
Class ilObjWorkspaceFolder.
static ilTempnam($a_temp_path=null)
Create a temporary file in an ILIAS writable directory.
cloneDependencies($a_target_id, $a_copy_id)
Clone object dependencies (crs items, preconditions)
static _lookupAbsolutePath($obj_id, $a_version=null)
return absolute path for version
Class ilObject2 This is an intermediate progress of ilObject class.
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
addAdditionalSubItemInformation(&$a_item_data)
Add additional information to sub item, e.g.