ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
class.ilImportDirectory.php
Go to the documentation of this file.
1<?php
2
20
22{
23 private const PATH_UPLOAD_PREFIX = 'upload';
24 private string $relative_path;
25
27 protected ilLogger $logger;
28
30 {
31 $this->storage = $storage;
32 $this->logger = $logger;
33 $this->init();
34 }
35
36 public function getRelativePath(): string
37 {
39 }
40
44 public function exists(): bool
45 {
46 return $this->storage->hasDir($this->relative_path);
47 }
48
52 public function getAbsolutePath(): string
53 {
54 if (!$this->exists()) {
55 return '';
56 }
58 }
59
60 abstract protected function getPathPrefix(): string;
61
62 private function init(): void
63 {
64 $this->relative_path = self::PATH_UPLOAD_PREFIX . '/' . $this->getPathPrefix();
65 }
66}
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