39 $web, $webRelativeWithLeadingDot, $webRelativeWithoutLeadingDot, $storage, $customizing, $customizingRelativeWithLeadingDot, $libs, $libsRelativeWithLeadingDot, $temp
63 throw new \InvalidArgumentException(
"Invalid path supplied. Path must start with the web, storage, temp, customizing or libs storage location. Path given: '{$absolute_path}'");
83 $web, $webRelativeWithLeadingDot, $webRelativeWithoutLeadingDot, $storage, $customizing, $customizingRelativeWithLeadingDot, $libs, $libsRelativeWithLeadingDot, $temp
115 throw new \InvalidArgumentException(
"Invalid path supplied. Path must start with the web, storage, temp, customizing or libs storage location. Path given: '{$absolute_path}'");
122 $real_possible_path = realpath($possible_path);
125 case $possible_path === $absolute_path:
126 case $real_possible_path === $absolute_path:
128 case strpos($absolute_path, $possible_path) === 0:
129 return substr($absolute_path, strlen($possible_path) + 1);
130 case strpos($absolute_path, $real_possible_path) === 0:
131 return substr($absolute_path, strlen($real_possible_path) + 1);
133 throw new \InvalidArgumentException(
"Invalid path supplied. Path must start with the web, storage, temp, customizing or libs storage location. Path given: '{$absolute_path}'");
146 $real_possible_path = realpath($possible_path);
149 case $possible_path === $absolute_path:
151 case $real_possible_path === $absolute_path:
153 case strpos($absolute_path, $possible_path) === 0:
155 case strpos($absolute_path, $real_possible_path) === 0:
168 $web = CLIENT_WEB_DIR;
169 $webRelativeWithLeadingDot =
'./' . ILIAS_WEB_DIR .
'/' . CLIENT_ID;
170 $webRelativeWithoutLeadingDot = ILIAS_WEB_DIR .
'/' . CLIENT_ID;
171 $storage = CLIENT_DATA_DIR;
172 $customizing = ILIAS_ABSOLUTE_PATH .
'/Customizing';
173 $customizingRelativeWithLeadingDot =
'./Customizing';
174 $libs = ILIAS_ABSOLUTE_PATH .
'/libs';
175 $libsRelativeWithLeadingDot =
"./libs";
176 $temp = CLIENT_DATA_DIR .
"/temp";
178 return array($web, $webRelativeWithLeadingDot, $webRelativeWithoutLeadingDot, $storage, $customizing, $customizingRelativeWithLeadingDot, $libs, $libsRelativeWithLeadingDot, $temp);
An exception for terminatinating execution or to throw for unit testing.
static resolveRelativePath($possible_path, $absolute_path)
static checkPossiblePath($possible_path, $absolute_path)
static deriveFilesystemFrom($absolute_path)
Tries to fetch the filesystem responsible for the absolute path.
static createRelativePath($absolute_path)
Creates a relative path from an absolute path which starts with a valid storage location.
trait FilesystemsAware
Trait FilesystemsAware.
static filesystems()
Returns the loaded filesystems.