7 declare(strict_types=1);
32 $this->driver = $driver;
39 string $directoryPath,
41 ?
string $scheme =
null,
42 bool $absolutePath =
false 44 $realDirectoryPath = $this->driver->getRealPathSafety($directoryPath);
45 if ($realDirectoryPath[-1] !== DIRECTORY_SEPARATOR) {
46 $realDirectoryPath .= DIRECTORY_SEPARATOR;
49 $actualPath = $this->driver->getRealPathSafety(
50 $this->driver->getAbsolutePath(
57 $actualPath = $this->driver->getRealPathSafety(
$path);
60 if (mb_strpos($actualPath, $realDirectoryPath) !== 0
61 &&
$path .DIRECTORY_SEPARATOR !== $realDirectoryPath
65 'Path "%1" cannot be used with directory "%2"',
66 [
$path, $directoryPath]
validate(string $directoryPath, string $path, ?string $scheme=null, bool $absolutePath=false)
__construct(DriverInterface $driver)