4 include_once
'./Services/FileSystem/classes/class.ilFileSystemStorage.php';
35 if(!$settings->get(
'soap_user_administration',0))
50 return 'ilRestFileStorage';
81 $GLOBALS[
'ilLog']->write(__METHOD__.
' original name: '.$this->getPath().
'/'.$name);
86 $GLOBALS[
'ilLog']->write(__METHOD__.
' no realpath found for: '.$this->getPath().
'/'.$name);
91 $GLOBALS[
'ilLog']->write(__METHOD__.
' translated name: '.$this->getPath().
'/'.$file_name);
94 is_file($this->
getPath().
'/'.$file_name) &&
95 file_exists($this->
getPath().
'/'.$file_name)
98 $GLOBALS[
'ilLog']->write(__METHOD__.
' delivering file: ' . $this->getPath().
'/'.$file_name);
99 $return = file_get_contents($this->
getPath().
'/'.$file_name);
115 $GLOBALS[
'ilLog']->write(__METHOD__.
' file not found.');
133 $body = $request->post(
"content");
139 $return = basename($tmpname);
141 $GLOBALS[
'ilLog']->write(__METHOD__.
' Writing to path '.
$path);
153 return basename($tmpname);
158 return $this->
getPath().
'/'.$tmpname;
166 $max_age =
time() - self::AVAILABILITY_IN_DAYS * 24 * 60 * 60;
167 $ite =
new DirectoryIterator($this->
getPath());
168 foreach($ite as
$file)
170 if($file->getCTime() <= $max_age)
173 @unlink($file->getPathname());
176 $GLOBALS[
'ilLog']->write(__METHOD__.
' '. $e->getMessage());
static getInstance( $name='default')
Get Slim application with name.
createFile()
Get file by md5 hash.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
init()
init and create directory
deleteDeprecated()
Delete deprecated files.
getStoredFilePath($tmpname)
getFile($name)
Get file by md5 hash.
getPathPostfix()
Get path prefix.
create()
Create directory.
writeToFile($a_data, $a_absolute_path)
Write data to file.
__construct()
Constructor.
const AVAILABILITY_IN_DAYS
storeFileForRest($content)
static ilTempnam($a_temp_path=null)
Create a temporary file in an ILIAS writable directory.
getPathPrefix()
Get path prefix.
responeNotFound()
Send not found response.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
checkWebserviceActivation()
Check if soap administration is enabled.