25 require_once
"class.ilObjectDAV.php";
27 require_once
'classes/class.ilHistory.php';
28 require_once
'Services/Utilities/classes/class.ilUtil.php';
29 require_once
"Modules/File/classes/class.ilObjFile.php";
68 $this->obj->setFileType($this->obj->guessFileType());
70 $this->obj->setPermissions($this->
getRefId());
77 $this->obj->setVersion($this->obj->getVersion() + 1);
79 $this->obj->getFileName().
",".$this->obj->getVersion());
113 return $this->obj->guessFileType();
121 $this->obj->setFileType($type);
129 $this->writeLog(
'setContentLength('.$length.
')');
130 $this->obj->setFileSize($length);
146 $file = $this->obj->getFile();
147 return (file_exists(
$file)) ? fopen(
$file,
'r') : null;
155 $file = $this->obj->getFile();
156 $parent = dirname(
$file);
157 if (! file_exists($parent))
162 return fopen(
$file,
'w');
175 $file = $this->obj->getFile();
176 return file_exists(
$file) ? filesize(
$file) : 0;
194 if (is_null($this->obj))
206 $this->isNewFile = $this->obj->getVersion() == 0;
207 if ($this->isNewFile)
209 $this->obj->setVersion(1);