function Filesystem::isReadable
Same name in this branch
- 11.1.x vendor/composer/composer/src/Composer/Util/Filesystem.php \Composer\Util\Filesystem::isReadable()
Tells whether a file exists and is readable.
Throws
IOException When windows path is longer than 258 characters
1 call to Filesystem::isReadable()
- Filesystem::rename in vendor/
symfony/ filesystem/ Filesystem.php - Renames a file or a directory.
File
-
vendor/
symfony/ filesystem/ Filesystem.php, line 313
Class
- Filesystem
- Provides basic utility to manipulate the file system.
Namespace
Symfony\Component\FilesystemCode
private function isReadable(string $filename) : bool {
$maxPathLength = \PHP_MAXPATHLEN - 2;
if (\strlen($filename) > $maxPathLength) {
throw new IOException(\sprintf('Could not check if file is readable because path length exceeds %d characters.', $maxPathLength), 0, null, $filename);
}
return is_readable($filename);
}