ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilImportDirectory.php
Go to the documentation of this file.
1<?php
19
21{
22 private const PATH_UPLOAD_PREFIX = 'upload';
23 private string $relative_path;
24
26 protected ilLogger $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 private function init(): void
62 {
63 $this->relative_path = self::PATH_UPLOAD_PREFIX . '/' . $this->getPathPrefix();
64 }
65}
static getDataDir()
get data directory (outside webspace)
__construct(Filesystem $storage, ilLogger $logger)
Component logger with individual log levels by component id.
The filesystem interface provides the public interface for the Filesystem service API consumer.
Definition: Filesystem.php:37