ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 $source, $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.
$source
Definition: linkback.php:22
+ 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 203 of file class.ilFSStorageCourse.php.

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

204  {
205  ilUtil::makeDirParents($this->getArchiveDirectory() . '/' . $a_name);
206  }
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 232 of file class.ilFSStorageCourse.php.

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

233  {
234  ilUtil::makeDirParents($this->getArchiveDirectory() . '/' . $a_name);
235  }
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  $this->log->write('Cannot write to file: ' . $this->getMemberExportDirectory() . '/' . $a_rel_name);
114  return false;
115  }
116 
117  return true;
118  }
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  $this->log->write('Cannot write to file: ' . $this->getMemberExportDirectory() . '/' . $a_rel_name);
139  return false;
140  }
141 
142  return true;
143  }
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 252 of file class.ilFSStorageCourse.php.

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

253  {
254  ilUtil::makeDir(CLIENT_WEB_DIR . '/courses/' . $a_rel_name);
255  ilUtil::rCopy($this->getArchiveDirectory() . '/' . $a_rel_name, CLIENT_WEB_DIR . '/courses/' . $a_rel_name);
256 
257  return true;
258  }
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 283 of file class.ilFSStorageCourse.php.

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

284  {
285  ilUtil::makeDirParents(CLIENT_WEB_DIR . '/courses/' . $a_rel_name);
286  ilUtil::rCopy($this->getArchiveDirectory() . '/' . $a_rel_name, CLIENT_WEB_DIR . '/courses/' . $a_rel_name);
287 
288  return true;
289  }
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 246 of file class.ilFSStorageCourse.php.

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

247  {
248  $this->deleteFile($this->getArchiveDirectory() . '/' . $a_rel_name . '.zip');
249  $this->deleteDirectory($this->getArchiveDirectory() . '/' . $a_rel_name);
250  }
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 277 of file class.ilFSStorageCourse.php.

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

278  {
279  $this->deleteFile($this->getArchiveDirectory() . '/' . $a_rel_name . '.zip');
280  $this->deleteDirectory($this->getArchiveDirectory() . '/' . $a_rel_name);
281  }
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 167 of file class.ilFSStorageCourse.php.

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

168  {
169  return $this->deleteFile($this->getMemberExportDirectory() . '/' . $a_export_name);
170  }
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 196 of file class.ilFSStorageCourse.php.

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

197  {
198  return $this->deleteFile($this->getMemberExportDirectory() . '/' . $a_export_name);
199  }
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 191 of file class.ilFSStorageCourse.php.

References ilFileSystemStorage\getAbsolutePath().

192  {
193  return $this->getAbsolutePath() . '/' . self::ARCHIVE_DIR;
194  }
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 220 of file class.ilFSStorageCourse.php.

References ilFileSystemStorage\getAbsolutePath().

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

221  {
222  return $this->getAbsolutePath() . '/' . self::ARCHIVE_DIR;
223  }
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 151 of file class.ilFSStorageCourse.php.

References getMemberExportDirectory().

152  {
153  $file_name = $this->getMemberExportDirectory() . '/' . $a_name;
154 
155  if (@file_exists($file_name)) {
156  return file_get_contents($file_name);
157  }
158  }
getMemberExportDirectory()
Get path of export directory.
+ Here is the call graph for this function:

◆ getMemberExportFile() [2/2]

ilFSStorageCourse::getMemberExportFile (   $a_name)

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

References getMemberExportDirectory().

181  {
182  $file_name = $this->getMemberExportDirectory() . '/' . $a_name;
183 
184  if (@file_exists($file_name)) {
185  return file_get_contents($file_name);
186  }
187  }
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 126 of file class.ilFSStorageCourse.php.

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

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

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

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

References ilUtil\getWebspaceDir().

261  {
262  return ilUtil::getWebspaceDir('filesystem') . '/courses/' . $a_rel_name . '/index.html';
263  }
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 291 of file class.ilFSStorageCourse.php.

References ilUtil\getWebspaceDir().

292  {
293  return ilUtil::getWebspaceDir('filesystem') . '/courses/' . $a_rel_name . '/index.html';
294  }
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 272 of file class.ilFSStorageCourse.php.

273  {
274  return 'course';
275  }

◆ getPathPostfix() [2/2]

ilFSStorageCourse::getPathPostfix ( )
protected

Implementation of abstract method.

protected

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

304  {
305  return 'crs';
306  }

◆ getPathPrefix() [1/2]

ilFSStorageCourse::getPathPrefix ( )
protected

Implementation of abstract method.

protected

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

284  {
285  return 'ilCourses';
286  }

◆ getPathPrefix() [2/2]

ilFSStorageCourse::getPathPrefix ( )
protected

Implementation of abstract method.

protected

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

315  {
316  return 'ilCourse';
317  }

◆ initArchiveDirectory() [1/2]

ilFSStorageCourse::initArchiveDirectory ( )

init Archive Directory

public

Parameters

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

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

181  {
183  }
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 209 of file class.ilFSStorageCourse.php.

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

210  {
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:

◆ 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 215 of file class.ilFSStorageCourse.php.

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

216  {
217  if (!$this->writeToFile($a_data, $this->getArchiveDirectory() . '/' . $a_rel_name)) {
218  $this->log->write('Cannot write to file: ' . $this->getArchiveDirectory() . '/' . $a_rel_name);
219  return false;
220  }
221  return true;
222  }
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 244 of file class.ilFSStorageCourse.php.

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

245  {
246  if (!$this->writeToFile($a_data, $this->getArchiveDirectory() . '/' . $a_rel_name)) {
247  $this->log->write('Cannot write to file: ' . $this->getArchiveDirectory() . '/' . $a_rel_name);
248  return false;
249  }
250  return true;
251  }
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 233 of file class.ilFSStorageCourse.php.

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

234  {
235  ilUtil::zip($this->getArchiveDirectory() . '/' . $a_rel_name, $this->getArchiveDirectory() . '/' . $a_zip_name);
236  return filesize($this->getArchiveDirectory() . '/' . $a_zip_name);
237  }
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 262 of file class.ilFSStorageCourse.php.

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

263  {
264  if (ilUtil::zip($this->getArchiveDirectory() . '/' . $a_rel_name, $this->getArchiveDirectory() . '/' . $a_zip_name)) {
265  return filesize($this->getArchiveDirectory() . '/' . $a_zip_name);
266  }
267  return 0;
268  }
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: