ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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...
 
static _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.

public

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

References $log, and ilFileSystemStorage\STORAGE_DATA.

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

◆ __construct() [2/2]

ilFSStorageCourse::__construct (   $a_container_id = 0)

Constructor.

public

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

References $log, and ilFileSystemStorage\STORAGE_DATA.

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

Member Function Documentation

◆ _clone()

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

Clone course data directory.

public

Parameters
stringobj_id source
stringobj_id target

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

References $target, and ilFileSystemStorage\_copyDirectory().

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  }
static _copyDirectory($a_source, $a_target)
Copy directory and all contents.
+ Here is the call graph for this function:

◆ addArchiveSubDirectory() [1/2]

ilFSStorageCourse::addArchiveSubDirectory (   $a_name)

Add subdirectory for archives.

public

Parameters
stringarchive subdirectory name

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

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

210  {
211  ilUtil::makeDirParents($this->getArchiveDirectory().'/'.$a_name);
212  }
static makeDirParents($a_dir)
Create a new directory and all parent directories.
getArchiveDirectory()
Get archive directory.
+ Here is the call graph for this function:

◆ addArchiveSubDirectory() [2/2]

ilFSStorageCourse::addArchiveSubDirectory (   $a_name)

Add subdirectory for archives.

public

Parameters
stringarchive subdirectory name

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

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

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

◆ addMemberExportFile() [1/2]

ilFSStorageCourse::addMemberExportFile (   $a_data,
  $a_rel_name 
)

Add new export file.

public

Parameters
stringdata
stringfilename

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

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

110  {
111  $this->initMemberExportDirectory();
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  }
initMemberExportDirectory()
Init export directory and create it if it does not exist.
getMemberExportDirectory()
Get path of export directory.
writeToFile($a_data, $a_absolute_path)
Write data to file.
+ Here is the call graph for this function:

◆ addMemberExportFile() [2/2]

ilFSStorageCourse::addMemberExportFile (   $a_data,
  $a_rel_name 
)

Add new export file.

public

Parameters
stringdata
stringfilename

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

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

135  {
136  $this->initMemberExportDirectory();
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  }
initMemberExportDirectory()
Init export directory and create it if it does not exist.
getMemberExportDirectory()
Get path of export directory.
writeToFile($a_data, $a_absolute_path)
Write data to file.
+ Here is the call graph for this function:

◆ createArchiveOnlineVersion() [1/2]

ilFSStorageCourse::createArchiveOnlineVersion (   $a_rel_name)

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

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

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  }
getArchiveDirectory()
Get archive directory.
static rCopy($a_sdir, $a_tdir, $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
+ Here is the call graph for this function:

◆ createArchiveOnlineVersion() [2/2]

ilFSStorageCourse::createArchiveOnlineVersion (   $a_rel_name)

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

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

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 makeDirParents($a_dir)
Create a new directory and all parent directories.
getArchiveDirectory()
Get archive directory.
static rCopy($a_sdir, $a_tdir, $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
+ Here is the call graph for this function:

◆ deleteArchive() [1/2]

ilFSStorageCourse::deleteArchive (   $a_rel_name)

Delete one archive.

public

Parameters

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

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

254  {
255  $this->deleteFile($this->getArchiveDirectory().'/'.$a_rel_name.'.zip');
256  $this->deleteDirectory($this->getArchiveDirectory().'/'.$a_rel_name);
257  }
getArchiveDirectory()
Get archive directory.
deleteDirectory($a_abs_name)
Delete directory.
deleteFile($a_abs_name)
Delete file.
+ Here is the call graph for this function:

◆ deleteArchive() [2/2]

ilFSStorageCourse::deleteArchive (   $a_rel_name)

Delete one archive.

public

Parameters

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

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

287  {
288  $this->deleteFile($this->getArchiveDirectory().'/'.$a_rel_name.'.zip');
289  $this->deleteDirectory($this->getArchiveDirectory().'/'.$a_rel_name);
290  }
getArchiveDirectory()
Get archive directory.
deleteDirectory($a_abs_name)
Delete directory.
deleteFile($a_abs_name)
Delete file.
+ Here is the call graph for this function:

◆ deleteMemberExportFile() [1/2]

ilFSStorageCourse::deleteMemberExportFile (   $a_export_name)

Delete Member Export File.

public

Parameters

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

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

174  {
175  return $this->deleteFile($this->getMemberExportDirectory().'/'.$a_export_name);
176  }
getMemberExportDirectory()
Get path of export directory.
deleteFile($a_abs_name)
Delete file.
+ Here is the call graph for this function:

◆ deleteMemberExportFile() [2/2]

ilFSStorageCourse::deleteMemberExportFile (   $a_export_name)

Delete Member Export File.

public

Parameters

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

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

204  {
205  return $this->deleteFile($this->getMemberExportDirectory().'/'.$a_export_name);
206  }
getMemberExportDirectory()
Get path of export directory.
deleteFile($a_abs_name)
Delete file.
+ Here is the call graph for this function:

◆ getArchiveDirectory() [1/2]

ilFSStorageCourse::getArchiveDirectory ( )

Get archive directory.

public

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

References ilFileSystemStorage\getAbsolutePath().

198  {
199  return $this->getAbsolutePath().'/'.self::ARCHIVE_DIR;
200  }
getAbsolutePath()
Get absolute path of storage directory.
+ Here is the call graph for this function:

◆ getArchiveDirectory() [2/2]

ilFSStorageCourse::getArchiveDirectory ( )

Get archive directory.

public

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

References ilFileSystemStorage\getAbsolutePath().

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

228  {
229  return $this->getAbsolutePath().'/'.self::ARCHIVE_DIR;
230  }
getAbsolutePath()
Get absolute path of storage directory.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInfoDirectory() [1/2]

ilFSStorageCourse::getInfoDirectory ( )

Get course info directory.

public

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

References ilFileSystemStorage\getAbsolutePath().

74  {
75  return $this->getAbsolutePath().'/'.self::INFO_DIR;
76  }
getAbsolutePath()
Get absolute path of storage directory.
+ Here is the call graph for this function:

◆ getInfoDirectory() [2/2]

ilFSStorageCourse::getInfoDirectory ( )

Get course info directory.

public

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

References ilFileSystemStorage\getAbsolutePath().

Referenced by initInfoDirectory().

99  {
100  return $this->getAbsolutePath().'/'.self::INFO_DIR;
101  }
getAbsolutePath()
Get absolute path of storage directory.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMemberExportDirectory() [1/2]

ilFSStorageCourse::getMemberExportDirectory ( )

Get path of export directory.

public

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

References ilFileSystemStorage\getAbsolutePath().

97  {
98  return $this->getAbsolutePath().'/'.self::MEMBER_EXPORT_DIR;
99  }
getAbsolutePath()
Get absolute path of storage directory.
+ Here is the call graph for this function:

◆ getMemberExportDirectory() [2/2]

ilFSStorageCourse::getMemberExportDirectory ( )

Get path of export directory.

public

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

References ilFileSystemStorage\getAbsolutePath().

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

122  {
123  return $this->getAbsolutePath().'/'.self::MEMBER_EXPORT_DIR;
124  }
getAbsolutePath()
Get absolute path of storage directory.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMemberExportFile() [1/2]

ilFSStorageCourse::getMemberExportFile (   $a_name)

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

References getMemberExportDirectory().

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  }
getMemberExportDirectory()
Get path of export directory.
+ Here is the call graph for this function:

◆ getMemberExportFile() [2/2]

ilFSStorageCourse::getMemberExportFile (   $a_name)

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

References getMemberExportDirectory().

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  }
getMemberExportDirectory()
Get path of export directory.
+ Here is the call graph for this function:

◆ getMemberExportFiles() [1/2]

ilFSStorageCourse::getMemberExportFiles ( )

Get all member export files.

public

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

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

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  }
$files
Definition: add-vimline.php:18
getMemberExportDirectory()
Get path of export directory.
Create styles array
The data for the language used.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
+ Here is the call graph for this function:

◆ getMemberExportFiles() [2/2]

ilFSStorageCourse::getMemberExportFiles ( )

Get all member export files.

public

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

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

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  }
$files
Definition: add-vimline.php:18
getMemberExportDirectory()
Get path of export directory.
Create styles array
The data for the language used.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
+ Here is the call graph for this function:

◆ getOnlineLink() [1/2]

ilFSStorageCourse::getOnlineLink (   $a_rel_name)

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

References ilUtil\getWebspaceDir().

268  {
269  return ilUtil::getWebspaceDir('filesystem').'/courses/'.$a_rel_name.'/index.html';
270  }
static getWebspaceDir($mode="filesystem")
get webspace directory
+ Here is the call graph for this function:

◆ getOnlineLink() [2/2]

ilFSStorageCourse::getOnlineLink (   $a_rel_name)

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

References ilUtil\getWebspaceDir().

301  {
302  return ilUtil::getWebspaceDir('filesystem').'/courses/'.$a_rel_name.'/index.html';
303  }
static getWebspaceDir($mode="filesystem")
get webspace directory
+ Here is the call graph for this function:

◆ getPathPostfix() [1/2]

ilFSStorageCourse::getPathPostfix ( )
protected

Implementation of abstract method.

protected

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

280  {
281  return 'course';
282  }

◆ getPathPostfix() [2/2]

ilFSStorageCourse::getPathPostfix ( )
protected

Implementation of abstract method.

protected

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

313  {
314  return 'crs';
315  }

◆ getPathPrefix() [1/2]

ilFSStorageCourse::getPathPrefix ( )
protected

Implementation of abstract method.

protected

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

291  {
292  return 'ilCourses';
293  }

◆ getPathPrefix() [2/2]

ilFSStorageCourse::getPathPrefix ( )
protected

Implementation of abstract method.

protected

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

324  {
325  return 'ilCourse';
326  }

◆ initArchiveDirectory() [1/2]

ilFSStorageCourse::initArchiveDirectory ( )

init Archive Directory

public

Parameters

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

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

187  {
189  }
static makeDirParents($a_dir)
Create a new directory and all parent directories.
getArchiveDirectory()
Get archive directory.
+ Here is the call graph for this function:

◆ initArchiveDirectory() [2/2]

ilFSStorageCourse::initArchiveDirectory ( )

init Archive Directory

public

Parameters

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

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

217  {
219  }
static makeDirParents($a_dir)
Create a new directory and all parent directories.
getArchiveDirectory()
Get archive directory.
+ Here is the call graph for this function:

◆ initInfoDirectory() [1/2]

ilFSStorageCourse::initInfoDirectory ( )

init info directory

public

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

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

63  {
65  }
static makeDirParents($a_dir)
Create a new directory and all parent directories.
getInfoDirectory()
Get course info directory.
+ Here is the call graph for this function:

◆ initInfoDirectory() [2/2]

ilFSStorageCourse::initInfoDirectory ( )

init info directory

public

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

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

88  {
90  }
static makeDirParents($a_dir)
Create a new directory and all parent directories.
getInfoDirectory()
Get course info directory.
+ Here is the call graph for this function:

◆ initMemberExportDirectory() [1/2]

ilFSStorageCourse::initMemberExportDirectory ( )

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

public

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

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

86  {
88  }
static makeDirParents($a_dir)
Create a new directory and all parent directories.
getMemberExportDirectory()
Get path of export directory.
+ Here is the call graph for this function:

◆ initMemberExportDirectory() [2/2]

ilFSStorageCourse::initMemberExportDirectory ( )

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

public

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

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

Referenced by addMemberExportFile().

111  {
113  }
static makeDirParents($a_dir)
Create a new directory and all parent directories.
getMemberExportDirectory()
Get path of export directory.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeArchiveFile() [1/2]

ilFSStorageCourse::writeArchiveFile (   $a_data,
  $a_rel_name 
)

Write archive string to file.

public

Parameters
stringrelative filename

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

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

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  }
getArchiveDirectory()
Get archive directory.
writeToFile($a_data, $a_absolute_path)
Write data to file.
+ Here is the call graph for this function:

◆ writeArchiveFile() [2/2]

ilFSStorageCourse::writeArchiveFile (   $a_data,
  $a_rel_name 
)

Write archive string to file.

public

Parameters
stringrelative filename

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

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

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  }
getArchiveDirectory()
Get archive directory.
writeToFile($a_data, $a_absolute_path)
Write data to file.
+ Here is the call graph for this function:

◆ zipArchive() [1/2]

ilFSStorageCourse::zipArchive (   $a_rel_name,
  $a_zip_name 
)

Zip archive directory.

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.

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

241  {
242  ilUtil::zip($this->getArchiveDirectory().'/'.$a_rel_name,$this->getArchiveDirectory().'/'.$a_zip_name);
243  return filesize($this->getArchiveDirectory().'/'.$a_zip_name);
244  }
getArchiveDirectory()
Get archive directory.
static zip($a_dir, $a_file, $compress_content=false)
zips given directory/file into given zip.file
+ Here is the call graph for this function:

◆ zipArchive() [2/2]

ilFSStorageCourse::zipArchive (   $a_rel_name,
  $a_zip_name 
)

Zip archive directory.

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.

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

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  }
getArchiveDirectory()
Get archive directory.
static zip($a_dir, $a_file, $compress_content=false)
zips given directory/file into given zip.file
+ 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.

◆ INFO_DIR

const ilFSStorageCourse::INFO_DIR = 'info'

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

◆ MEMBER_EXPORT_DIR

const ilFSStorageCourse::MEMBER_EXPORT_DIR = 'memberExport'

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


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