file_exists
laravel/octane
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Checks whether a file or directory exists
file_exists
(
string $filename
):
bool
{
$path
=
$this
->
basePath
.
'/bootstrap/app.php'
;
if (!
file_exists
(
$path
)) {
throw new
RuntimeException
(
"Application bootstrap file not found [
{
$path
}
]."
);
}
src/ApplicationFactory.php
$process
=
Process
::
fromShellCommandline
(
$command
,
null
,
null
,
null
,
null
);
if (
'\\'
!==
DIRECTORY_SEPARATOR
&&
file_exists
(
'/dev/tty'
) &&
is_readable
(
'/dev/tty'
)) {
try {
$process
->
setTty
(
true
);
} catch (
RuntimeException $e
) {
src/Commands/Concerns/InstallsRoadRunnerDependencies.php
$phpPath
= (new
PhpExecutableFinder
)->
find
();
if (!
file_exists
(
$composerPath
)) {
$composerPath
= (new
ExecutableFinder
())->
find
(
'composer'
);
}
src/Commands/Concerns/InstallsRoadRunnerDependencies.php
protected function
findRoadRunnerBinary
(): ?
string
{
if (
file_exists
(
base_path
(
'rr'
))) {
return
base_path
(
'rr'
);
}
src/RoadRunner/Concerns/FindsRoadRunnerBinary.php