is_file

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Tells whether the filename is a regular file
<?php is_file(string $filename): bool
<?php     protected function emailOutput(Mailer $mailer, $addresses, $onlyIfOutputExists = false)

    {

        $text = is_file($this->output) ? file_get_contents($this->output) : '';



        if ($onlyIfOutputExists && empty($text)) {

            return;
<?php     protected function withOutputCallback(Closure $callback, $onlyIfOutputExists = false)

    {

        return function (Container $container) use ($callback, $onlyIfOutputExists) {

            $output = $this->output && is_file($this->output) ? file_get_contents($this->output) : '';



            return $onlyIfOutputExists && empty($output)

                            ? null
<?php         if ($connection instanceof SqlServerConnection ||

            ! is_file($path = $this->schemaPath($connection))) {

            return;

        }
<?php     protected function resolveStubPath($stub)

    {

        return is_file($customPath = $this->laravel->basePath(trim($stub, '/')))

            ? $customPath

            : __DIR__.$stub;

    }
<?php     public function isFile($file)

    {

        return is_file($file);

    }
<?php     protected function ensureFacadeExists($alias)

    {

        if (is_file($path = storage_path('framework/cache/facade-'.sha1($alias).'.php'))) {

            return $path;

        }
<?php     public function configurationIsCached()

    {

        return is_file($this->getCachedConfigPath());

    }
<?php     protected function setEnvironmentFilePath($app, $file)

    {

        if (is_file($app->environmentPath().'/'.$file)) {

            $app->loadEnvironmentFrom($file);



            return true;
<?php     {

        $laravel = new Application(getcwd());



        if (is_file($configPath = $laravel->getCachedConfigPath())) {

            @unlink($configPath);

        }
<?php             @unlink($configPath);

        }



        if (is_file($servicesPath = $laravel->getCachedServicesPath())) {

            @unlink($servicesPath);

        }
<?php             @unlink($servicesPath);

        }



        if (is_file($packagesPath = $laravel->getCachedPackagesPath())) {

            @unlink($packagesPath);

        }

    }
<?php         $this->app->afterResolving(ConsoleKernel::class, function ($kernel) use ($commands) {

            [$commands, $paths] = collect($commands)->partition(fn ($command) => class_exists($command));

            [$routes, $paths] = $paths->partition(fn ($path) => is_file($path));



            $this->app->booted(static function () use ($kernel, $commands, $paths, $routes) {

                $kernel->addCommands($commands->all());
<?php     public function handle()

    {

        if (is_file($servicesPath = $this->laravel->getCachedServicesPath())) {

            @unlink($servicesPath);

        }
<?php             @unlink($servicesPath);

        }



        if (is_file($packagesPath = $this->laravel->getCachedPackagesPath())) {

            @unlink($packagesPath);

        }
<?php             $this->laravel->maintenanceMode()->deactivate();



            if (is_file(storage_path('framework/maintenance.php'))) {

                unlink(storage_path('framework/maintenance.php'));

            }