ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilImportDirectory.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
5
7{
11 private const PATH_UPLOAD_PREFIX = 'upload';
12
17
21 protected $storage;
22
26 protected $logger;
27
29 {
30 $this->storage = $storage;
31 $this->logger = $logger;
32 $this->init();
33 }
34
35 public function getRelativePath() : string
36 {
38 }
39
43 public function exists() : bool
44 {
45 return $this->storage->hasDir($this->relative_path);
46 }
47
51 public function getAbsolutePath() : string
52 {
53 if (!$this->exists()) {
54 return '';
55 }
57 }
58
59 abstract protected function getPathPrefix() : string;
60
61
62 private function init()
63 {
64 $this->relative_path = self::PATH_UPLOAD_PREFIX . '/' . $this->getPathPrefix();
65 }
66}
An exception for terminatinating execution or to throw for unit testing.
__construct(Filesystem $storage, ilLogger $logger)
Component logger with individual log levels by component id.
static getDataDir()
get data directory (outside webspace)
Interface Filesystem The filesystem interface provides the public interface for the Filesystem servic...
Definition: Filesystem.php:22
Class FlySystemFileAccessTest \Provider\FlySystem @runTestsInSeparateProcesses @preserveGlobalState d...