ILIAS  release_8 Revision v8.25
class.ilFileDataImport.php
Go to the documentation of this file.
1<?php
2/******************************************************************************
3 *
4 * This file is part of ILIAS, a powerful learning management system.
5 *
6 * ILIAS is licensed with the GPL-3.0, you should have received a copy
7 * of said license along with the source code.
8 *
9 * If this is not the case or you just want to try ILIAS, you'll find
10 * us at:
11 * https://www.ilias.de
12 * https://github.com/ILIAS-eLearning
13 *
14 *****************************************************************************/
19{
20 protected string $import_path;
21
22 public function __construct()
23 {
24 define('IMPORT_PATH', 'import');
26 $this->import_path = parent::getPath() . "/" . IMPORT_PATH;
27 $this->initExportDirectory();
28 }
29
30 public function getPath(): string
31 {
32 return $this->import_path;
33 }
34
35 private function initExportDirectory(): void
36 {
37 if (!file_exists($this->import_path)) {
38 ilFileUtils::makeDir($this->import_path);
39 }
40 }
41}
static makeDir(string $a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc