3declare(strict_types=1);
45 $webRelativeWithLeadingDot,
46 $webRelativeWithoutLeadingDot,
49 $customizingRelativeWithLeadingDot,
51 $libsRelativeWithLeadingDot,
54 $nodeModulesWithLeadingDot
70 throw new \InvalidArgumentException(
"Invalid path supplied. Path must start with the web, storage, temp, customizing or libs storage location. Path given: '{$absolute_path}'");
91 $webRelativeWithLeadingDot,
92 $webRelativeWithoutLeadingDot,
95 $customizingRelativeWithLeadingDot,
97 $libsRelativeWithLeadingDot,
100 $nodeModulesWithLeadingDot
127 throw new \InvalidArgumentException(
"Invalid path supplied. Path must start with the web, storage, temp, customizing or libs storage location. Path given: '{$absolute_path}'");
148 $webRelativeWithLeadingDot,
149 $webRelativeWithoutLeadingDot,
152 $customizingRelativeWithLeadingDot,
154 $libsRelativeWithLeadingDot,
157 $nodeModulesWithLeadingDot
193 throw new \InvalidArgumentException(
"Invalid path supplied. Path must start with the web, storage, temp, customizing or libs storage location. Path given: '{$absolute_path}'");
200 $real_possible_path = realpath($possible_path);
203 case $possible_path === $absolute_path:
204 case $real_possible_path === $absolute_path:
206 case strpos($absolute_path, $possible_path) === 0:
209 strlen($possible_path) + 1
211 case strpos($absolute_path, $real_possible_path) === 0:
214 strlen($real_possible_path) + 1
217 throw new \InvalidArgumentException(
"Invalid path supplied. Path must start with the web, storage, temp, customizing or libs storage location. Path given: '{$absolute_path}'");
230 $real_possible_path = realpath($possible_path);
233 case $possible_path === $absolute_path:
235 case $real_possible_path === $absolute_path:
237 case is_string($possible_path) && strpos($absolute_path, $possible_path) === 0:
239 case is_string($real_possible_path) && strpos($absolute_path, $real_possible_path) === 0:
256 $customizing = ILIAS_ABSOLUTE_PATH .
'/Customizing';
257 $customizingRelativeWithLeadingDot =
'./Customizing';
258 $libs = ILIAS_ABSOLUTE_PATH .
'/libs';
259 $libsRelativeWithLeadingDot =
"./libs";
261 $nodeModules = ILIAS_ABSOLUTE_PATH .
'/node_modules';
262 $nodeModulesWithLeadingDot =
'./node_modules';
265 $webRelativeWithLeadingDot,
266 $webRelativeWithoutLeadingDot,
269 $customizingRelativeWithLeadingDot,
271 $libsRelativeWithLeadingDot,
274 $nodeModulesWithLeadingDot
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 deriveLocationFrom(string $absolute_path)
static checkPossiblePath(string $possible_path, string $absolute_path)
static resolveRelativePath(string $possible_path, string $absolute_path)
const TEMPORARY
The ILIAS temporary directory.
const CUSTOMIZING
The filesystem within the web root where all the skins and plugins are saved.
const WEB
The filesystem within the ilias web root.
const STORAGE
The filesystem outside of the ilias web root.
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.