ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilFSStorageCourse Class Reference
+ Inheritance diagram for ilFSStorageCourse:
+ Collaboration diagram for ilFSStorageCourse:

Public Member Functions

 __construct ($a_container_id=0)
 Constructor. More...
 
 initInfoDirectory ()
 init info directory More...
 
 getInfoDirectory ()
 Get course info directory. More...
 
 initMemberExportDirectory ()
 Init export directory and create it if it does not exist. More...
 
 getMemberExportDirectory ()
 Get path of export directory. More...
 
 addMemberExportFile ($a_data, $a_rel_name)
 Add new export file. More...
 
 getMemberExportFiles ()
 Get all member export files. More...
 
 getMemberExportFile ($a_name)
 
 deleteMemberExportFile ($a_export_name)
 Delete Member Export File. More...
 
 initArchiveDirectory ()
 init Archive Directory More...
 
 getArchiveDirectory ()
 Get archive directory. More...
 
 addArchiveSubDirectory ($a_name)
 Add subdirectory for archives. More...
 
 writeArchiveFile ($a_data, $a_rel_name)
 Write archive string to file. More...
 
 zipArchive ($a_rel_name, $a_zip_name)
 Zip archive directory. More...
 
 deleteArchive ($a_rel_name)
 Delete one archive. More...
 
 createArchiveOnlineVersion ($a_rel_name)
 
 getOnlineLink ($a_rel_name)
 
 __construct ($a_container_id=0)
 Constructor. More...
 
 initInfoDirectory ()
 init info directory More...
 
 getInfoDirectory ()
 Get course info directory. More...
 
 initMemberExportDirectory ()
 Init export directory and create it if it does not exist. More...
 
 getMemberExportDirectory ()
 Get path of export directory. More...
 
 addMemberExportFile ($a_data, $a_rel_name)
 Add new export file. More...
 
 getMemberExportFiles ()
 Get all member export files. More...
 
 getMemberExportFile ($a_name)
 
 deleteMemberExportFile ($a_export_name)
 Delete Member Export File. More...
 
 initArchiveDirectory ()
 init Archive Directory More...
 
 getArchiveDirectory ()
 Get archive directory. More...
 
 addArchiveSubDirectory ($a_name)
 Add subdirectory for archives. More...
 
 writeArchiveFile ($a_data, $a_rel_name)
 Write archive string to file. More...
 
 zipArchive ($a_rel_name, $a_zip_name)
 Zip archive directory. More...
 
 deleteArchive ($a_rel_name)
 Delete one archive. More...
 
 createArchiveOnlineVersion ($a_rel_name)
 
 getOnlineLink ($a_rel_name)
 
- Public Member Functions inherited from ilFileSystemStorage
 __construct ($a_storage_type, $a_path_conversion, $a_container_id)
 Constructor. More...
 
 getContainerId ()
 
 create ()
 Create directory. More...
 
 getAbsolutePath ()
 Get absolute path of storage directory. More...
 
 writeToFile ($a_data, $a_absolute_path)
 Write data to file. More...
 
 deleteFile ($a_abs_name)
 Delete file. More...
 
 deleteDirectory ($a_abs_name)
 Delete directory. More...
 
 delete ()
 Delete complete directory. More...
 
 copyFile ($a_from, $a_to)
 Copy files. More...
 
 appendToPath ($a_appendix)
 
 getStorageType ()
 
 getPath ()
 Get path. More...
 
 __construct ($a_storage_type, $a_path_conversion, $a_container_id)
 Constructor. More...
 
 create ()
 Create directory. More...
 
 getAbsolutePath ()
 Get absolute path of storage directory. More...
 
 getShortPath ()
 
 rename ($from, $to)
 

Static Public Member Functions

static _clone ($a_source_id, $a_target_id)
 Clone course data directory. More...
 
- Static Public Member Functions inherited from ilFileSystemStorage
static _createPathFromId ($a_container_id, $a_name)
 Create a path from an id: e.g 12345 will be converted to 12/34/<name>_5. More...
 
 _copyDirectory ($a_source, $a_target)
 Copy directory and all contents. More...
 
static _createPathFromId ($a_container_id, $a_name)
 Create a path from an id: e.g 12345 will be converted to 12/34/<name>_5. More...
 

Data Fields

const MEMBER_EXPORT_DIR = 'memberExport'
 
const INFO_DIR = 'info'
 
const ARCHIVE_DIR = 'archives'
 
- Data Fields inherited from ilFileSystemStorage
const STORAGE_WEB = 1
 
const STORAGE_DATA = 2
 
const STORAGE_SECURED = 3
 
const FACTOR = 100
 
const MAX_EXPONENT = 3
 
const SECURED_DIRECTORY = "sec"
 

Protected Member Functions

 getPathPostfix ()
 Implementation of abstract method. More...
 
 getPathPrefix ()
 Implementation of abstract method. More...
 
 getPathPostfix ()
 Implementation of abstract method. More...
 
 getPathPrefix ()
 Implementation of abstract method. More...
 
- Protected Member Functions inherited from ilFileSystemStorage
 getPathPrefix ()
 Get path prefix. More...
 
 getPathPostfix ()
 Get directory name. More...
 
 init ()
 Read path info. More...
 
 getPathPrefix ()
 Get path prefix. More...
 
 getPathPostfix ()
 Get directory name. More...
 

Private Attributes

 $log
 

Additional Inherited Members

- Protected Attributes inherited from ilFileSystemStorage
 $path
 

Detailed Description

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 34 of file class.ilFSStorageCourse.php.

Constructor & Destructor Documentation

◆ __construct() [1/2]

ilFSStorageCourse::__construct (   $a_container_id = 0)

Constructor.

@access public

Definition at line 47 of file class.ilFSStorageCourse.php.

48 {
49 global $log;
50
51 $this->log = $log;
52 parent::__construct(ilFileSystemStorage::STORAGE_DATA,true,$a_container_id);
53 }

References $log, and ilFileSystemStorage\STORAGE_DATA.

◆ __construct() [2/2]

ilFSStorageCourse::__construct (   $a_container_id = 0)

Constructor.

@access public

Definition at line 47 of file class.ilFSStorageCourse.php.

48 {
49 global $log;
50
51 $this->log = $log;
52 parent::__construct(ilFileSystemStorage::STORAGE_DATA,true,$a_container_id);
53 }

References $log, and ilFileSystemStorage\STORAGE_DATA.

Member Function Documentation

◆ _clone()

static ilFSStorageCourse::_clone (   $a_source_id,
  $a_target_id 
)
static

Clone course data directory.

@access public

Parameters
stringobj_id source
stringobj_id target

Definition at line 64 of file class.ilFSStorageCourse.php.

65 {
66 $source = new ilFSStorageCourse($a_source_id);
67 $target = new ilFSStorageCourse($a_target_id);
68
69 $target->create();
70 ilFileSystemStorage::_copyDirectory($source->getAbsolutePath(),$target->getAbsolutePath());
71
72 // Delete member export files
73 $target->deleteDirectory($target->getMemberExportDirectory());
74
75 unset($source);
76 unset($target);
77 return true;
78 }
_copyDirectory($a_source, $a_target)
Copy directory and all contents.

References ilFileSystemStorage\_copyDirectory().

+ Here is the call graph for this function:

◆ addArchiveSubDirectory() [1/2]

ilFSStorageCourse::addArchiveSubDirectory (   $a_name)

Add subdirectory for archives.

@access public

Parameters
stringarchive subdirectory name

Definition at line 239 of file class.ilFSStorageCourse.php.

240 {
241 ilUtil::makeDirParents($this->getArchiveDirectory().'/'.$a_name);
242 }
getArchiveDirectory()
Get archive directory.
static makeDirParents($a_dir)
Create a new directory and all parent directories.

References getArchiveDirectory(), and ilUtil\makeDirParents().

+ Here is the call graph for this function:

◆ addArchiveSubDirectory() [2/2]

ilFSStorageCourse::addArchiveSubDirectory (   $a_name)

Add subdirectory for archives.

@access public

Parameters
stringarchive subdirectory name

Definition at line 209 of file class.ilFSStorageCourse.php.

210 {
211 ilUtil::makeDirParents($this->getArchiveDirectory().'/'.$a_name);
212 }

References getArchiveDirectory(), and ilUtil\makeDirParents().

+ Here is the call graph for this function:

◆ addMemberExportFile() [1/2]

ilFSStorageCourse::addMemberExportFile (   $a_data,
  $a_rel_name 
)

Add new export file.

@access public

Parameters
stringdata
stringfilename

Definition at line 134 of file class.ilFSStorageCourse.php.

135 {
137 if(!$this->writeToFile($a_data,$this->getMemberExportDirectory().'/'.$a_rel_name))
138 {
139 $this->log->write('Cannot write to file: '.$this->getMemberExportDirectory().'/'.$a_rel_name);
140 return false;
141 }
142
143 return true;
144
145 }
getMemberExportDirectory()
Get path of export directory.
initMemberExportDirectory()
Init export directory and create it if it does not exist.
writeToFile($a_data, $a_absolute_path)
Write data to file.

References getMemberExportDirectory(), initMemberExportDirectory(), and ilFileSystemStorage\writeToFile().

+ Here is the call graph for this function:

◆ addMemberExportFile() [2/2]

ilFSStorageCourse::addMemberExportFile (   $a_data,
  $a_rel_name 
)

Add new export file.

@access public

Parameters
stringdata
stringfilename

Definition at line 109 of file class.ilFSStorageCourse.php.

110 {
112 if(!$this->writeToFile($a_data,$this->getMemberExportDirectory().'/'.$a_rel_name))
113 {
114 $this->log->write('Cannot write to file: '.$this->getMemberExportDirectory().'/'.$a_rel_name);
115 return false;
116 }
117
118 return true;
119
120 }

References getMemberExportDirectory(), initMemberExportDirectory(), and ilFileSystemStorage\writeToFile().

+ Here is the call graph for this function:

◆ createArchiveOnlineVersion() [1/2]

ilFSStorageCourse::createArchiveOnlineVersion (   $a_rel_name)

Definition at line 292 of file class.ilFSStorageCourse.php.

293 {
294 ilUtil::makeDirParents(CLIENT_WEB_DIR.'/courses/'.$a_rel_name);
295 ilUtil::rCopy($this->getArchiveDirectory().'/'.$a_rel_name,CLIENT_WEB_DIR.'/courses/'.$a_rel_name);
296
297 return true;
298 }
static rCopy($a_sdir, $a_tdir, $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.

References getArchiveDirectory(), ilUtil\makeDirParents(), and ilUtil\rCopy().

+ Here is the call graph for this function:

◆ createArchiveOnlineVersion() [2/2]

ilFSStorageCourse::createArchiveOnlineVersion (   $a_rel_name)

Definition at line 259 of file class.ilFSStorageCourse.php.

260 {
261 ilUtil::makeDir(CLIENT_WEB_DIR.'/courses/'.$a_rel_name);
262 ilUtil::rCopy($this->getArchiveDirectory().'/'.$a_rel_name,CLIENT_WEB_DIR.'/courses/'.$a_rel_name);
263
264 return true;
265 }
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...

References getArchiveDirectory(), ilUtil\makeDir(), and ilUtil\rCopy().

+ Here is the call graph for this function:

◆ deleteArchive() [1/2]

ilFSStorageCourse::deleteArchive (   $a_rel_name)

Delete one archive.

@access public

Parameters

Definition at line 286 of file class.ilFSStorageCourse.php.

287 {
288 $this->deleteFile($this->getArchiveDirectory().'/'.$a_rel_name.'.zip');
289 $this->deleteDirectory($this->getArchiveDirectory().'/'.$a_rel_name);
290 }
deleteFile($a_abs_name)
Delete file.
deleteDirectory($a_abs_name)
Delete directory.

References ilFileSystemStorage\deleteDirectory(), ilFileSystemStorage\deleteFile(), and getArchiveDirectory().

+ Here is the call graph for this function:

◆ deleteArchive() [2/2]

ilFSStorageCourse::deleteArchive (   $a_rel_name)

Delete one archive.

@access public

Parameters

Definition at line 253 of file class.ilFSStorageCourse.php.

254 {
255 $this->deleteFile($this->getArchiveDirectory().'/'.$a_rel_name.'.zip');
256 $this->deleteDirectory($this->getArchiveDirectory().'/'.$a_rel_name);
257 }

References ilFileSystemStorage\deleteDirectory(), ilFileSystemStorage\deleteFile(), and getArchiveDirectory().

+ Here is the call graph for this function:

◆ deleteMemberExportFile() [1/2]

ilFSStorageCourse::deleteMemberExportFile (   $a_export_name)

Delete Member Export File.

@access public

Parameters

Definition at line 203 of file class.ilFSStorageCourse.php.

204 {
205 return $this->deleteFile($this->getMemberExportDirectory().'/'.$a_export_name);
206 }

References ilFileSystemStorage\deleteFile(), and getMemberExportDirectory().

+ Here is the call graph for this function:

◆ deleteMemberExportFile() [2/2]

ilFSStorageCourse::deleteMemberExportFile (   $a_export_name)

Delete Member Export File.

@access public

Parameters

Definition at line 173 of file class.ilFSStorageCourse.php.

174 {
175 return $this->deleteFile($this->getMemberExportDirectory().'/'.$a_export_name);
176 }

References ilFileSystemStorage\deleteFile(), and getMemberExportDirectory().

+ Here is the call graph for this function:

◆ getArchiveDirectory() [1/2]

ilFSStorageCourse::getArchiveDirectory ( )

Get archive directory.

@access public

Definition at line 227 of file class.ilFSStorageCourse.php.

228 {
229 return $this->getAbsolutePath().'/'.self::ARCHIVE_DIR;
230 }
getAbsolutePath()
Get absolute path of storage directory.

References ARCHIVE_DIR, and ilFileSystemStorage\getAbsolutePath().

Referenced by addArchiveSubDirectory(), createArchiveOnlineVersion(), deleteArchive(), initArchiveDirectory(), writeArchiveFile(), and zipArchive().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getArchiveDirectory() [2/2]

ilFSStorageCourse::getArchiveDirectory ( )

Get archive directory.

@access public

Definition at line 197 of file class.ilFSStorageCourse.php.

198 {
199 return $this->getAbsolutePath().'/'.self::ARCHIVE_DIR;
200 }

References ARCHIVE_DIR, and ilFileSystemStorage\getAbsolutePath().

+ Here is the call graph for this function:

◆ getInfoDirectory() [1/2]

ilFSStorageCourse::getInfoDirectory ( )

Get course info directory.

@access public

Definition at line 98 of file class.ilFSStorageCourse.php.

99 {
100 return $this->getAbsolutePath().'/'.self::INFO_DIR;
101 }

References ilFileSystemStorage\getAbsolutePath(), and INFO_DIR.

Referenced by initInfoDirectory().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInfoDirectory() [2/2]

ilFSStorageCourse::getInfoDirectory ( )

Get course info directory.

@access public

Definition at line 73 of file class.ilFSStorageCourse.php.

74 {
75 return $this->getAbsolutePath().'/'.self::INFO_DIR;
76 }

References ilFileSystemStorage\getAbsolutePath(), and INFO_DIR.

+ Here is the call graph for this function:

◆ getMemberExportDirectory() [1/2]

ilFSStorageCourse::getMemberExportDirectory ( )

Get path of export directory.

@access public

Definition at line 121 of file class.ilFSStorageCourse.php.

122 {
123 return $this->getAbsolutePath().'/'.self::MEMBER_EXPORT_DIR;
124 }

References ilFileSystemStorage\getAbsolutePath(), and MEMBER_EXPORT_DIR.

Referenced by addMemberExportFile(), deleteMemberExportFile(), getMemberExportFile(), getMemberExportFiles(), and initMemberExportDirectory().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMemberExportDirectory() [2/2]

ilFSStorageCourse::getMemberExportDirectory ( )

Get path of export directory.

@access public

Definition at line 96 of file class.ilFSStorageCourse.php.

97 {
98 return $this->getAbsolutePath().'/'.self::MEMBER_EXPORT_DIR;
99 }

References ilFileSystemStorage\getAbsolutePath(), and MEMBER_EXPORT_DIR.

+ Here is the call graph for this function:

◆ getMemberExportFile() [1/2]

ilFSStorageCourse::getMemberExportFile (   $a_name)

Definition at line 186 of file class.ilFSStorageCourse.php.

187 {
188 $file_name = $this->getMemberExportDirectory().'/'.$a_name;
189
190 if(@file_exists($file_name))
191 {
192 return file_get_contents($file_name);
193 }
194 }

References getMemberExportDirectory().

+ Here is the call graph for this function:

◆ getMemberExportFile() [2/2]

ilFSStorageCourse::getMemberExportFile (   $a_name)

Definition at line 156 of file class.ilFSStorageCourse.php.

157 {
158 $file_name = $this->getMemberExportDirectory().'/'.$a_name;
159
160 if(@file_exists($file_name))
161 {
162 return file_get_contents($file_name);
163 }
164 }

References getMemberExportDirectory().

+ Here is the call graph for this function:

◆ getMemberExportFiles() [1/2]

ilFSStorageCourse::getMemberExportFiles ( )

Get all member export files.

@access public

Definition at line 153 of file class.ilFSStorageCourse.php.

154 {
155 if(!@is_dir($this->getMemberExportDirectory()))
156 {
157 return array();
158 }
159
160 $files = array();
161 $dp = @opendir($this->getMemberExportDirectory());
162
163 while($file = readdir($dp))
164 {
165 if(is_dir($file))
166 {
167 continue;
168 }
169
170 if(preg_match("/^([0-9]{10})_[a-zA-Z]*_export_([a-z]+)_([0-9]+)\.[a-z]+$/",$file,$matches) and $matches[3] == $this->getContainerId())
171 {
172 $timest = $matches[1];
173 $file_info['name'] = $matches[0];
174 $file_info['timest'] = $matches[1];
175 $file_info['type'] = $matches[2];
176 $file_info['id'] = $matches[3];
177 $file_info['size'] = filesize($this->getMemberExportDirectory().'/'.$file);
178
179 $files[$timest] = $file_info;
180 }
181 }
182 closedir($dp);
183 return $files ? $files : array();
184 }
print $file

References $file, ilFileSystemStorage\getContainerId(), and getMemberExportDirectory().

+ Here is the call graph for this function:

◆ getMemberExportFiles() [2/2]

ilFSStorageCourse::getMemberExportFiles ( )

Get all member export files.

@access public

Definition at line 128 of file class.ilFSStorageCourse.php.

129 {
130 $files = array();
131 $dp = opendir($this->getMemberExportDirectory());
132
133 while($file = readdir($dp))
134 {
135 if(is_dir($file))
136 {
137 continue;
138 }
139
140 if(preg_match("/^([0-9]{10})_[a-zA-Z]*_export_([a-z]+)_([0-9]+)\.[a-z]+$/",$file,$matches) and $matches[3] == $this->getContainerId())
141 {
142 $timest = $matches[1];
143 $file_info['name'] = $matches[0];
144 $file_info['timest'] = $matches[1];
145 $file_info['type'] = $matches[2];
146 $file_info['id'] = $matches[3];
147 $file_info['size'] = filesize($this->getMemberExportDirectory().'/'.$file);
148
149 $files[$timest] = $file_info;
150 }
151 }
152 closedir($dp);
153 return $files ? $files : array();
154 }

References $file, ilFileSystemStorage\getContainerId(), and getMemberExportDirectory().

+ Here is the call graph for this function:

◆ getOnlineLink() [1/2]

ilFSStorageCourse::getOnlineLink (   $a_rel_name)

Definition at line 300 of file class.ilFSStorageCourse.php.

301 {
302 return ilUtil::getWebspaceDir('filesystem').'/courses/'.$a_rel_name.'/index.html';
303 }
static getWebspaceDir($mode="filesystem")
get webspace directory

References ilUtil\getWebspaceDir().

+ Here is the call graph for this function:

◆ getOnlineLink() [2/2]

ilFSStorageCourse::getOnlineLink (   $a_rel_name)

Definition at line 267 of file class.ilFSStorageCourse.php.

268 {
269 return ilUtil::getWebspaceDir('filesystem').'/courses/'.$a_rel_name.'/index.html';
270 }

References ilUtil\getWebspaceDir().

+ Here is the call graph for this function:

◆ getPathPostfix() [1/2]

ilFSStorageCourse::getPathPostfix ( )
protected

Implementation of abstract method.

@access protected

Reimplemented from ilFileSystemStorage.

Definition at line 312 of file class.ilFSStorageCourse.php.

313 {
314 return 'crs';
315 }

◆ getPathPostfix() [2/2]

ilFSStorageCourse::getPathPostfix ( )
protected

Implementation of abstract method.

@access protected

Reimplemented from ilFileSystemStorage.

Definition at line 279 of file class.ilFSStorageCourse.php.

280 {
281 return 'course';
282 }

◆ getPathPrefix() [1/2]

ilFSStorageCourse::getPathPrefix ( )
protected

Implementation of abstract method.

@access protected

Reimplemented from ilFileSystemStorage.

Definition at line 323 of file class.ilFSStorageCourse.php.

324 {
325 return 'ilCourse';
326 }

◆ getPathPrefix() [2/2]

ilFSStorageCourse::getPathPrefix ( )
protected

Implementation of abstract method.

@access protected

Reimplemented from ilFileSystemStorage.

Definition at line 290 of file class.ilFSStorageCourse.php.

291 {
292 return 'ilCourses';
293 }

◆ initArchiveDirectory() [1/2]

ilFSStorageCourse::initArchiveDirectory ( )

init Archive Directory

@access public

Parameters

Definition at line 216 of file class.ilFSStorageCourse.php.

217 {
219 }

References getArchiveDirectory(), and ilUtil\makeDirParents().

+ Here is the call graph for this function:

◆ initArchiveDirectory() [2/2]

ilFSStorageCourse::initArchiveDirectory ( )

init Archive Directory

@access public

Parameters

Definition at line 186 of file class.ilFSStorageCourse.php.

187 {
189 }

References getArchiveDirectory(), and ilUtil\makeDirParents().

+ Here is the call graph for this function:

◆ initInfoDirectory() [1/2]

ilFSStorageCourse::initInfoDirectory ( )

init info directory

@access public

Definition at line 87 of file class.ilFSStorageCourse.php.

88 {
90 }
getInfoDirectory()
Get course info directory.

References getInfoDirectory(), and ilUtil\makeDirParents().

+ Here is the call graph for this function:

◆ initInfoDirectory() [2/2]

ilFSStorageCourse::initInfoDirectory ( )

init info directory

@access public

Definition at line 62 of file class.ilFSStorageCourse.php.

63 {
65 }

References getInfoDirectory(), and ilUtil\makeDirParents().

+ Here is the call graph for this function:

◆ initMemberExportDirectory() [1/2]

ilFSStorageCourse::initMemberExportDirectory ( )

Init export directory and create it if it does not exist.

@access public

Definition at line 110 of file class.ilFSStorageCourse.php.

References getMemberExportDirectory(), and ilUtil\makeDirParents().

Referenced by addMemberExportFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initMemberExportDirectory() [2/2]

ilFSStorageCourse::initMemberExportDirectory ( )

Init export directory and create it if it does not exist.

@access public

Definition at line 85 of file class.ilFSStorageCourse.php.

References getMemberExportDirectory(), and ilUtil\makeDirParents().

+ Here is the call graph for this function:

◆ writeArchiveFile() [1/2]

ilFSStorageCourse::writeArchiveFile (   $a_data,
  $a_rel_name 
)

Write archive string to file.

@access public

Parameters
stringrelative filename

Definition at line 251 of file class.ilFSStorageCourse.php.

252 {
253 if(!$this->writeToFile($a_data,$this->getArchiveDirectory().'/'.$a_rel_name))
254 {
255 $this->log->write('Cannot write to file: '.$this->getArchiveDirectory().'/'.$a_rel_name);
256 return false;
257 }
258 return true;
259 }

References getArchiveDirectory(), and ilFileSystemStorage\writeToFile().

+ Here is the call graph for this function:

◆ writeArchiveFile() [2/2]

ilFSStorageCourse::writeArchiveFile (   $a_data,
  $a_rel_name 
)

Write archive string to file.

@access public

Parameters
stringrelative filename

Definition at line 221 of file class.ilFSStorageCourse.php.

222 {
223 if(!$this->writeToFile($a_data,$this->getArchiveDirectory().'/'.$a_rel_name))
224 {
225 $this->log->write('Cannot write to file: '.$this->getArchiveDirectory().'/'.$a_rel_name);
226 return false;
227 }
228 return true;
229 }

References getArchiveDirectory(), and ilFileSystemStorage\writeToFile().

+ Here is the call graph for this function:

◆ zipArchive() [1/2]

ilFSStorageCourse::zipArchive (   $a_rel_name,
  $a_zip_name 
)

Zip archive directory.

@access public

Parameters
stringrelative name of directory to zip
stringzip archive name
Returns
int filesize of zip archive

Definition at line 270 of file class.ilFSStorageCourse.php.

271 {
272 if(ilUtil::zip($this->getArchiveDirectory().'/'.$a_rel_name,$this->getArchiveDirectory().'/'.$a_zip_name))
273 {
274 return filesize($this->getArchiveDirectory().'/'.$a_zip_name);
275 }
276 return 0;
277 }
static zip($a_dir, $a_file, $compress_content=false)

References getArchiveDirectory(), and ilUtil\zip().

+ Here is the call graph for this function:

◆ zipArchive() [2/2]

ilFSStorageCourse::zipArchive (   $a_rel_name,
  $a_zip_name 
)

Zip archive directory.

@access public

Parameters
stringrelative name of directory to zip
stringzip archive name
Returns
int filesize of zip archive

Definition at line 240 of file class.ilFSStorageCourse.php.

241 {
242 ilUtil::zip($this->getArchiveDirectory().'/'.$a_rel_name,$this->getArchiveDirectory().'/'.$a_zip_name);
243 return filesize($this->getArchiveDirectory().'/'.$a_zip_name);
244 }

References getArchiveDirectory(), and ilUtil\zip().

+ Here is the call graph for this function:

Field Documentation

◆ $log

ilFSStorageCourse::$log
private

Definition at line 40 of file class.ilFSStorageCourse.php.

Referenced by __construct().

◆ ARCHIVE_DIR

const ilFSStorageCourse::ARCHIVE_DIR = 'archives'

Definition at line 38 of file class.ilFSStorageCourse.php.

Referenced by getArchiveDirectory().

◆ INFO_DIR

const ilFSStorageCourse::INFO_DIR = 'info'

Definition at line 37 of file class.ilFSStorageCourse.php.

Referenced by getInfoDirectory().

◆ MEMBER_EXPORT_DIR

const ilFSStorageCourse::MEMBER_EXPORT_DIR = 'memberExport'

Definition at line 36 of file class.ilFSStorageCourse.php.

Referenced by getMemberExportDirectory().


The documentation for this class was generated from the following files: