function Filesystem::isAbsolutePath
Same name in this branch
- 11.1.x vendor/composer/composer/src/Composer/Util/Filesystem.php \Composer\Util\Filesystem::isAbsolutePath()
Returns whether the file path is an absolute path.
1 call to Filesystem::isAbsolutePath()
- Filesystem::makePathRelative in vendor/
symfony/ filesystem/ Filesystem.php - Given an existing path, convert it to a path relative to a given starting path.
File
-
vendor/
symfony/ filesystem/ Filesystem.php, line 581
Class
- Filesystem
- Provides basic utility to manipulate the file system.
Namespace
Symfony\Component\FilesystemCode
public function isAbsolutePath(string $file) : bool {
return '' !== $file && (strspn($file, '/\\', 0, 1) || \strlen($file) > 3 && ctype_alpha($file[0]) && ':' === $file[1] && strspn($file, '/\\', 2, 1) || null !== parse_url($file, \PHP_URL_SCHEME));
}