2declare(strict_types=1);
33 $webRelativeWithLeadingDot,
34 $webRelativeWithoutLeadingDot,
37 $customizingRelativeWithLeadingDot,
39 $libsRelativeWithLeadingDot,
42 $nodeModulesWithLeadingDot
69 throw new \InvalidArgumentException(
"Invalid path supplied. Path must start with the web, storage, temp, customizing or libs storage location. Path given: '{$absolute_path}'");
85 $webRelativeWithLeadingDot,
86 $webRelativeWithoutLeadingDot,
89 $customizingRelativeWithLeadingDot,
91 $libsRelativeWithLeadingDot,
94 $nodeModulesWithLeadingDot
130 throw new \InvalidArgumentException(
"Invalid path supplied. Path must start with the web, storage, temp, customizing or libs storage location. Path given: '{$absolute_path}'");
136 $real_possible_path = realpath($possible_path);
139 case $possible_path === $absolute_path:
140 case $real_possible_path === $absolute_path:
142 case strpos($absolute_path, $possible_path) === 0:
143 return substr($absolute_path,
144 strlen($possible_path) + 1);
145 case strpos($absolute_path, $real_possible_path) === 0:
146 return substr($absolute_path,
147 strlen($real_possible_path) + 1);
149 throw new \InvalidArgumentException(
"Invalid path supplied. Path must start with the web, storage, temp, customizing or libs storage location. Path given: '{$absolute_path}'");
160 $real_possible_path = realpath($possible_path);
163 case $possible_path === $absolute_path:
165 case $real_possible_path === $absolute_path:
167 case is_string($possible_path) && strpos($absolute_path, $possible_path) === 0:
169 case is_string($real_possible_path) && strpos($absolute_path, $real_possible_path) === 0:
185 $customizing = ILIAS_ABSOLUTE_PATH .
'/Customizing';
186 $customizingRelativeWithLeadingDot =
'./Customizing';
187 $libs = ILIAS_ABSOLUTE_PATH .
'/libs';
188 $libsRelativeWithLeadingDot =
"./libs";
190 $nodeModules = ILIAS_ABSOLUTE_PATH .
'/node_modules';
191 $nodeModulesWithLeadingDot =
'./node_modules';
194 $webRelativeWithLeadingDot,
195 $webRelativeWithoutLeadingDot,
198 $customizingRelativeWithLeadingDot,
200 $libsRelativeWithLeadingDot,
203 $nodeModulesWithLeadingDot
An exception for terminatinating execution or to throw for unit testing.
Class LegacyPathHelper The legacy path helper provides convenient functions for the integration of th...
static createRelativePath(string $absolute_path)
Creates a relative path from an absolute path which starts with a valid storage location.
static deriveFilesystemFrom(string $absolute_path)
Tries to fetch the filesystem responsible for the absolute path.
static checkPossiblePath(string $possible_path, string $absolute_path)
static resolveRelativePath(string $possible_path, string $absolute_path)
Interface Filesystem The filesystem interface provides the public interface for the Filesystem servic...
Class FlySystemFileAccessTest \Provider\FlySystem @runTestsInSeparateProcesses @preserveGlobalState d...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
trait FilesystemsAware
Trait FilesystemsAware.
static filesystems()
Returns the loaded filesystems.